Fix a null pointer related to Supports hitting mobs.
This commit is contained in:
parent
ab148c67a2
commit
7e96105941
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
name: BankEconomy
|
name: BankEconomy
|
||||||
main: me.kaZep.Base.Main
|
main: me.kaZep.Base.Main
|
||||||
version: 1.3.0
|
version: 256
|
||||||
description: Bank plugin which stores money.
|
description: Bank plugin which stores money.
|
||||||
commands:
|
commands:
|
||||||
bankeconomy:
|
bankeconomy:
|
||||||
|
@ -2520,10 +2520,14 @@ public void checkJukeboxes() {
|
|||||||
if (Bukkit.getPlayer(supportmoblist.get(i).p.getName())!=null) {
|
if (Bukkit.getPlayer(supportmoblist.get(i).p.getName())!=null) {
|
||||||
for (int j=0;j<supportmoblist.get(i).id.size();j++) {
|
for (int j=0;j<supportmoblist.get(i).id.size();j++) {
|
||||||
if (supportmoblist.get(i).registeredtime<Bukkit.getWorld("world").getFullTime()) {
|
if (supportmoblist.get(i).registeredtime<Bukkit.getWorld("world").getFullTime()) {
|
||||||
|
supportmoblist.get(i).id.remove(j);
|
||||||
|
j--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*if (supportmoblist.get(i).registeredtime<Bukkit.getWorld("world").getFullTime()) {
|
||||||
supportmoblist.remove(i);
|
supportmoblist.remove(i);
|
||||||
i--;
|
i--;
|
||||||
}
|
}*/
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGING_UPDATE_COUNTS++; //4
|
LOGGING_UPDATE_COUNTS++; //4
|
||||||
|
@ -5191,6 +5191,7 @@ public ItemStack getGoodie() {
|
|||||||
//Check to see if there are any pies we need to keep for later.
|
//Check to see if there are any pies we need to keep for later.
|
||||||
List<ItemStack> items = new ArrayList<ItemStack>();
|
List<ItemStack> items = new ArrayList<ItemStack>();
|
||||||
for (int i=0;i<p.getInventory().getContents().length;i++) {
|
for (int i=0;i<p.getInventory().getContents().length;i++) {
|
||||||
|
if (p.getInventory().getContents()[i]!=null) {
|
||||||
if (p.getInventory().getContents()[i].getType()==Material.PUMPKIN_PIE &&
|
if (p.getInventory().getContents()[i].getType()==Material.PUMPKIN_PIE &&
|
||||||
p.getInventory().getContents()[i].hasItemMeta() &&
|
p.getInventory().getContents()[i].hasItemMeta() &&
|
||||||
p.getInventory().getContents()[i].getItemMeta().getLore()!=null) {
|
p.getInventory().getContents()[i].getItemMeta().getLore()!=null) {
|
||||||
@ -5198,6 +5199,7 @@ public ItemStack getGoodie() {
|
|||||||
items.add(p.getInventory().getContents()[i]);
|
items.add(p.getInventory().getContents()[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for (int i=0;i<pies;i++) {
|
for (int i=0;i<pies;i++) {
|
||||||
p.getInventory().remove(Material.PUMPKIN_PIE);
|
p.getInventory().remove(Material.PUMPKIN_PIE);
|
||||||
//Remove the pies. Remove the magic pie.
|
//Remove the pies. Remove the magic pie.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user