mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-18 11:22:15 +01:00
Fixed NPE
This commit is contained in:
parent
11b114ca16
commit
b1ee09f733
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue