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