more NPE fixes regarding redstone

Dieser Commit ist enthalten in:
Tahg 2011-03-11 20:47:59 -05:00
Ursprung 5c4f1d75b5
Commit 79ccc5320a
3 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -12,7 +12,7 @@ public class BlockBloodStone extends Block {
// Craftbukkit start // Craftbukkit start
public void a(World world, int i, int j, int k, int l) { public void a(World world, int i, int j, int k, int l) {
if (net.minecraft.server.Block.byId[l].c()) { if (net.minecraft.server.Block.byId[l] != null && net.minecraft.server.Block.byId[l].c()) {
CraftWorld craftWorld = ((WorldServer) world).getWorld(); CraftWorld craftWorld = ((WorldServer) world).getWorld();
CraftServer server = ((WorldServer) world).getServer(); CraftServer server = ((WorldServer) world).getServer();
org.bukkit.block.Block block = craftWorld.getBlockAt(i, j, k); org.bukkit.block.Block block = craftWorld.getBlockAt(i, j, k);

Datei anzeigen

@ -53,7 +53,7 @@ public class BlockPumpkin extends Block {
// Craftbukkit start // Craftbukkit start
public void a(World world, int i, int j, int k, int l) { public void a(World world, int i, int j, int k, int l) {
if (net.minecraft.server.Block.byId[l].c()) { if (net.minecraft.server.Block.byId[l] != null && net.minecraft.server.Block.byId[l].c()) {
CraftWorld craftWorld = ((WorldServer) world).getWorld(); CraftWorld craftWorld = ((WorldServer) world).getWorld();
CraftServer server = ((WorldServer) world).getServer(); CraftServer server = ((WorldServer) world).getServer();
org.bukkit.block.Block block = craftWorld.getBlockAt(i, j, k); org.bukkit.block.Block block = craftWorld.getBlockAt(i, j, k);

Datei anzeigen

@ -106,7 +106,7 @@ public class BlockSign extends BlockContainer {
super.a(world, i, j, k, l); super.a(world, i, j, k, l);
// Craftbukkit start // Craftbukkit start
if (net.minecraft.server.Block.byId[l].c()) { if (net.minecraft.server.Block.byId[l] != null && net.minecraft.server.Block.byId[l].c()) {
CraftWorld craftWorld = ((WorldServer) world).getWorld(); CraftWorld craftWorld = ((WorldServer) world).getWorld();
CraftServer server = ((WorldServer) world).getServer(); CraftServer server = ((WorldServer) world).getServer();
Block block = craftWorld.getBlockAt(i, j, k); Block block = craftWorld.getBlockAt(i, j, k);