|
@@ -184,16 +184,19 @@ public class m
|
|
|
for(int i = 0; i < quantity; i++)
|
|
|
mcDropItem(location, is);
|
|
|
}
|
|
|
+
|
|
|
public static void mcRandomDropItem(Location location, ItemStack is, int chance)
|
|
|
{
|
|
|
if(Math.random() * 100 < chance)
|
|
|
mcDropItem(location, is);
|
|
|
}
|
|
|
+
|
|
|
public static void mcRandomDropItems(Location location, ItemStack is, int chance, int quantity)
|
|
|
{
|
|
|
for(int i = 0; i < quantity; i++)
|
|
|
mcRandomDropItem(location, is, chance);
|
|
|
}
|
|
|
+
|
|
|
public static void mcDropItem(Location location, ItemStack itemStack) {
|
|
|
// We can't get the item until we spawn it and we want to make it cancellable, so we have a custom event.
|
|
|
McMMOItemSpawnEvent event = new McMMOItemSpawnEvent(location, itemStack);
|