mirror of
https://github.com/bloodmc/GriefDefender.git
synced 2024-09-25 04:12:51 +02:00
Fix investigation tool.
* Fix NPE during entity move.
This commit is contained in:
parent
557f09a4de
commit
3f430645e4
@ -331,9 +331,11 @@ public boolean onEntityMove(MoveEntityEvent event, Location<World> fromLocation,
|
|||||||
user.getInternalPlayerData().inTown = false;
|
user.getInternalPlayerData().inTown = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player != null) {
|
||||||
checkPlayerFlight(player, user.getInternalPlayerData(), fromClaim, toClaim);
|
checkPlayerFlight(player, user.getInternalPlayerData(), fromClaim, toClaim);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GDTimings.ENTITY_MOVE_EVENT.stopTimingIfSync();
|
GDTimings.ENTITY_MOVE_EVENT.stopTimingIfSync();
|
||||||
return true;
|
return true;
|
||||||
|
@ -980,13 +980,12 @@ private void onPlayerHandleClaimCreateAction(InteractEvent event, BlockSnapshot
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if (!playerData.claimMode) {
|
if (!playerData.claimMode) {
|
||||||
GriefDefenderConfig<?> activeConfig = GriefDefenderPlugin.getActiveConfig(player.getWorld().getProperties());
|
GriefDefenderConfig<?> activeConfig = GriefDefenderPlugin.getActiveConfig(player.getWorld().getProperties());
|
||||||
ItemType materialInHand = player.getItemInHand(handType).get().getType();
|
if (!itemInHand.getType().getId().equals(activeConfig.getConfig().claim.modificationTool)) {
|
||||||
if (!materialInHand.getId().equals(activeConfig.getConfig().claim.modificationTool)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|
||||||
GDTimings.PLAYER_HANDLE_SHOVEL_ACTION.startTimingIfSync();
|
GDTimings.PLAYER_HANDLE_SHOVEL_ACTION.startTimingIfSync();
|
||||||
BlockSnapshot clickedBlock = targetBlock;
|
BlockSnapshot clickedBlock = targetBlock;
|
||||||
|
Loading…
Reference in New Issue
Block a user