Fix a null pointer with Halloween event rain.

anvil_rework
sigonasr2 11 years ago
parent 31a1c0c5a8
commit ab148c67a2
  1. BIN
      BankEconomyMod/bin/me/kaZep/Base/Main$1.class
  2. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$4.class
  3. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$5.class
  4. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$6.class
  5. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener.class
  6. 8
      BankEconomyMod/src/me/kaZep/Base/Main.java

@ -997,10 +997,10 @@ public void runTick() {
Item i = null; Item i = null;
int item = (int)(Math.random()*4); int item = (int)(Math.random()*4);
switch (item) { switch (item) {
case 0: {Bukkit.getWorld("world").dropItemNaturally(p.getLocation().add((int)(Math.random()*20)-(int)(Math.random()*20), 256, (int)(Math.random()*20)-(int)(Math.random()*20)),new ItemStack(Material.PUMPKIN));}break; case 0: {i=Bukkit.getWorld("world").dropItemNaturally(p.getLocation().add((int)(Math.random()*20)-(int)(Math.random()*20), 256, (int)(Math.random()*20)-(int)(Math.random()*20)),new ItemStack(Material.PUMPKIN));}break;
case 1: {Bukkit.getWorld("world").dropItemNaturally(p.getLocation().add((int)(Math.random()*20)-(int)(Math.random()*20), 256, (int)(Math.random()*20)-(int)(Math.random()*20)),new ItemStack(Material.EGG));}break; case 1: {i=Bukkit.getWorld("world").dropItemNaturally(p.getLocation().add((int)(Math.random()*20)-(int)(Math.random()*20), 256, (int)(Math.random()*20)-(int)(Math.random()*20)),new ItemStack(Material.EGG));}break;
case 2: {Bukkit.getWorld("world").dropItemNaturally(p.getLocation().add((int)(Math.random()*20)-(int)(Math.random()*20), 256, (int)(Math.random()*20)-(int)(Math.random()*20)),new ItemStack(Material.SUGAR));}break; case 2: {i=Bukkit.getWorld("world").dropItemNaturally(p.getLocation().add((int)(Math.random()*20)-(int)(Math.random()*20), 256, (int)(Math.random()*20)-(int)(Math.random()*20)),new ItemStack(Material.SUGAR));}break;
case 3: {Bukkit.getWorld("world").dropItemNaturally(p.getLocation().add((int)(Math.random()*20)-(int)(Math.random()*20), 256, (int)(Math.random()*20)-(int)(Math.random()*20)),new ItemStack(Material.PUMPKIN_PIE));}break; case 3: {i=Bukkit.getWorld("world").dropItemNaturally(p.getLocation().add((int)(Math.random()*20)-(int)(Math.random()*20), 256, (int)(Math.random()*20)-(int)(Math.random()*20)),new ItemStack(Material.PUMPKIN_PIE));}break;
} }
i.setTicksLived(3600); i.setTicksLived(3600);
} }

Loading…
Cancel
Save