Fixed item drops for custom skeletons
This commit is contained in:
parent
4d8d188bda
commit
8cb2941520
@ -54,15 +54,17 @@ public class CustomSkeleton extends EntitySkeleton implements CustomEntity {
|
||||
|
||||
@Override
|
||||
public void killCustom() {
|
||||
/*for (int i = 1; i <= 2500; ++i) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().npc.contains("npc.Demon.Drops." + Integer.toString(i))) {
|
||||
final int chance = new Random().nextInt(100);
|
||||
if (chance <= Herobrine.getPluginCore().getConfigDB().npc.getInt("npc.Demon.Drops." + Integer.toString(i) + ".Chance")) {
|
||||
getBukkitEntity().getLocation().getWorld().dropItemNaturally(getBukkitEntity().getLocation(),
|
||||
new ItemStack(Material.getMaterial(i), Herobrine.getPluginCore().getConfigDB().npc.getInt("npc.Demon.Drops." + Integer.toString(i) + ".Count")));
|
||||
}
|
||||
Object[] items = Herobrine.getPluginCore().getConfigDB().npc.getConfigurationSection("npc.Demon.Drops")
|
||||
.getKeys(false).toArray();
|
||||
for (Object itemObj : items) {
|
||||
String item = itemObj.toString();
|
||||
final int chance = new Random().nextInt(100);
|
||||
if (chance <= Herobrine.getPluginCore().getConfigDB().npc.getInt("npc.Demon.Drops." + item + ".Chance")) {
|
||||
getBukkitEntity().getLocation().getWorld().dropItemNaturally(getBukkitEntity().getLocation(),
|
||||
new ItemStack(Material.matchMaterial(item), Herobrine.getPluginCore().getConfigDB().npc
|
||||
.getInt("npc.Demon.Drops." + item + ".Count")));
|
||||
}
|
||||
}*/
|
||||
}
|
||||
setHealth(0.0f);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user