summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTaylor Kelly <tkelly910@gmail.com>2011-01-09 22:42:50 -0500
committerTaylor Kelly <tkelly910@gmail.com>2011-01-09 22:42:50 -0500
commitb1ee09f733be162c64212bbbc648b112f990d288 (patch)
treef471cb8545e03ca935799b2e1239300ad3d13d0e /src
parent11b114ca162b3ce9e6b266205e5d953efa38d809 (diff)
downloadcraftbukkit-b1ee09f733be162c64212bbbc648b112f990d288.tar
craftbukkit-b1ee09f733be162c64212bbbc648b112f990d288.tar.gz
craftbukkit-b1ee09f733be162c64212bbbc648b112f990d288.tar.lz
craftbukkit-b1ee09f733be162c64212bbbc648b112f990d288.tar.xz
craftbukkit-b1ee09f733be162c64212bbbc648b112f990d288.zip
Fixed NPE
Diffstat (limited to 'src')
-rw-r--r--src/main/java/net/minecraft/server/NetServerHandler.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java
index c9a3a2a1..eb8958b8 100644
--- a/src/main/java/net/minecraft/server/NetServerHandler.java
+++ b/src/main/java/net/minecraft/server/NetServerHandler.java
@@ -282,10 +282,9 @@ public class NetServerHandler extends NetHandler
// Craftbukkit start
CraftBlock block = (CraftBlock) player.getWorld().getBlockAt(l, i1, j1);
- int blockID = 0;
+ int blockID = block.getTypeID();
float damage = 0;
- if(block != null) {
- blockID = block.getTypeID();
+ if(Block.m[blockID] != null) {
damage = Block.m[blockID].a(player.getHandle()); //Get amount of damage going to block
}