Fixed NPE
This commit is contained in:
parent
c6d80df80d
commit
750cc107ae
@ -282,8 +282,12 @@ public class NetServerHandler extends NetHandler
|
|||||||
|
|
||||||
// Craftbukkit start
|
// Craftbukkit start
|
||||||
CraftBlock block = (CraftBlock) player.getWorld().getBlockAt(l, i1, j1);
|
CraftBlock block = (CraftBlock) player.getWorld().getBlockAt(l, i1, j1);
|
||||||
int blockID = block.getTypeID();
|
int blockID = 0;
|
||||||
float damage = Block.m[blockID].a(player.getHandle()); //Get amount of damage going to block
|
float damage = 0;
|
||||||
|
if(block != null) {
|
||||||
|
blockID = block.getTypeID();
|
||||||
|
damage = Block.m[blockID].a(player.getHandle()); //Get amount of damage going to block
|
||||||
|
}
|
||||||
|
|
||||||
if (packet14blockdig.e == 0) {
|
if (packet14blockdig.e == 0) {
|
||||||
if (i2 > 16 || flag) {
|
if (i2 > 16 || flag) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user