Fix a null pointer related to Supports hitting mobs.

anvil_rework
sigonasr2 11 years ago
parent ab148c67a2
commit 7e96105941
  1. BIN
      BankEconomyMod/bin/me/kaZep/Base/Main$2.class
  2. BIN
      BankEconomyMod/bin/me/kaZep/Base/Main$3.class
  3. BIN
      BankEconomyMod/bin/me/kaZep/Base/Main$4.class
  4. BIN
      BankEconomyMod/bin/me/kaZep/Base/Main.class
  5. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$4.class
  6. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$5.class
  7. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$6.class
  8. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener.class
  9. 2
      BankEconomyMod/plugin.yml
  10. 8
      BankEconomyMod/src/me/kaZep/Base/Main.java
  11. 12
      BankEconomyMod/src/me/kaZep/Base/PlayerListener.java

@ -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.remove(i); supportmoblist.get(i).id.remove(j);
i--; j--;
} }
} }
/*if (supportmoblist.get(i).registeredtime<Bukkit.getWorld("world").getFullTime()) {
supportmoblist.remove(i);
i--;
}*/
} }
} }
LOGGING_UPDATE_COUNTS++; //4 LOGGING_UPDATE_COUNTS++; //4

@ -5191,11 +5191,13 @@ 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].getType()==Material.PUMPKIN_PIE && if (p.getInventory().getContents()[i]!=null) {
p.getInventory().getContents()[i].hasItemMeta() && if (p.getInventory().getContents()[i].getType()==Material.PUMPKIN_PIE &&
p.getInventory().getContents()[i].getItemMeta().getLore()!=null) { p.getInventory().getContents()[i].hasItemMeta() &&
//This is a special pie. Must keep. p.getInventory().getContents()[i].getItemMeta().getLore()!=null) {
items.add(p.getInventory().getContents()[i]); //This is a special pie. Must keep.
items.add(p.getInventory().getContents()[i]);
}
} }
} }
for (int i=0;i<pies;i++) { for (int i=0;i<pies;i++) {

Loading…
Cancel
Save