mirror of
https://github.com/bloodmc/GriefDefender.git
synced 2024-11-25 12:45:48 +01:00
Fix NPE during claim create.
This commit is contained in:
parent
db4e50ca9c
commit
71d45beaec
@ -1514,6 +1514,7 @@ private ClaimResult checkSizeLimits(Player player, GDPlayerData playerData, Vect
|
||||
final Component message = MessageCache.getInstance().CREATE_SUBDIVISION_ONLY;
|
||||
GriefDefenderPlugin.sendMessage(player, message);
|
||||
playerData.lastShovelLocation = null;
|
||||
playerData.claimResizing = null;
|
||||
// TODO: Add new result type for this
|
||||
return new GDClaimResult(ClaimResultType.BELOW_MIN_SIZE_X, message);
|
||||
}
|
||||
|
@ -984,7 +984,7 @@ private void onPlayerHandleClaimCreateAction(PlayerInteractEvent event, Block cl
|
||||
return;
|
||||
}
|
||||
|
||||
if (playerData.claimResizing != null) {
|
||||
if (playerData.claimResizing != null && playerData.lastShovelLocation != null) {
|
||||
handleResizeFinish(event, player, location, playerData);
|
||||
GDTimings.PLAYER_HANDLE_SHOVEL_ACTION.stopTiming();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user