Fix investigation tool.

* Fix NPE during entity move.
This commit is contained in:
bloodshot 2019-11-30 21:01:59 -05:00
parent 557f09a4de
commit 3f430645e4
2 changed files with 6 additions and 5 deletions

View File

@ -331,9 +331,11 @@ public boolean onEntityMove(MoveEntityEvent event, Location<World> fromLocation,
user.getInternalPlayerData().inTown = false;
}
if (player != null) {
checkPlayerFlight(player, user.getInternalPlayerData(), fromClaim, toClaim);
}
}
}
GDTimings.ENTITY_MOVE_EVENT.stopTimingIfSync();
return true;

View File

@ -980,13 +980,12 @@ private void onPlayerHandleClaimCreateAction(InteractEvent event, BlockSnapshot
return;
}
/*if (!playerData.claimMode) {
if (!playerData.claimMode) {
GriefDefenderConfig<?> activeConfig = GriefDefenderPlugin.getActiveConfig(player.getWorld().getProperties());
ItemType materialInHand = player.getItemInHand(handType).get().getType();
if (!materialInHand.getId().equals(activeConfig.getConfig().claim.modificationTool)) {
if (!itemInHand.getType().getId().equals(activeConfig.getConfig().claim.modificationTool)) {
return;
}
}*/
}
GDTimings.PLAYER_HANDLE_SHOVEL_ACTION.startTimingIfSync();
BlockSnapshot clickedBlock = targetBlock;