Fix a null pointer related to Supports hitting mobs.

This commit is contained in:
sigonasr2 2013-11-01 23:58:29 -07:00
parent ab148c67a2
commit 7e96105941
11 changed files with 14 additions and 8 deletions

View File

@ -1,6 +1,6 @@
name: BankEconomy
main: me.kaZep.Base.Main
version: 1.3.0
version: 256
description: Bank plugin which stores money.
commands:
bankeconomy:

View File

@ -2520,10 +2520,14 @@ public void checkJukeboxes() {
if (Bukkit.getPlayer(supportmoblist.get(i).p.getName())!=null) {
for (int j=0;j<supportmoblist.get(i).id.size();j++) {
if (supportmoblist.get(i).registeredtime<Bukkit.getWorld("world").getFullTime()) {
supportmoblist.remove(i);
i--;
supportmoblist.get(i).id.remove(j);
j--;
}
}
/*if (supportmoblist.get(i).registeredtime<Bukkit.getWorld("world").getFullTime()) {
supportmoblist.remove(i);
i--;
}*/
}
}
LOGGING_UPDATE_COUNTS++; //4

View File

@ -5191,11 +5191,13 @@ public ItemStack getGoodie() {
//Check to see if there are any pies we need to keep for later.
List<ItemStack> items = new ArrayList<ItemStack>();
for (int i=0;i<p.getInventory().getContents().length;i++) {
if (p.getInventory().getContents()[i].getType()==Material.PUMPKIN_PIE &&
p.getInventory().getContents()[i].hasItemMeta() &&
p.getInventory().getContents()[i].getItemMeta().getLore()!=null) {
//This is a special pie. Must keep.
items.add(p.getInventory().getContents()[i]);
if (p.getInventory().getContents()[i]!=null) {
if (p.getInventory().getContents()[i].getType()==Material.PUMPKIN_PIE &&
p.getInventory().getContents()[i].hasItemMeta() &&
p.getInventory().getContents()[i].getItemMeta().getLore()!=null) {
//This is a special pie. Must keep.
items.add(p.getInventory().getContents()[i]);
}
}
}
for (int i=0;i<pies;i++) {