mirror of
https://github.com/bloodmc/GriefDefender.git
synced 2025-01-04 19:08:39 +01:00
Fix NPE during InventoryMoveItemEvent. Fixes #285
This commit is contained in:
parent
c93dad7bea
commit
ba722f7e52
@ -127,6 +127,10 @@ public void onInventoryMoveItemEvent(InventoryMoveItemEvent event) {
|
||||
final Inventory targetInventory = event.getDestination();
|
||||
final Location sourceLocation = sourceInventory.getLocation();
|
||||
final Location targetLocation = targetInventory.getLocation();
|
||||
if (sourceLocation == null || targetLocation == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
final GDClaim sourceClaim = GriefDefenderPlugin.getInstance().dataStore.getClaimAt(sourceLocation);
|
||||
final GDClaim targetClaim = GriefDefenderPlugin.getInstance().dataStore.getClaimAt(targetLocation);
|
||||
if (sourceClaim.isWilderness() && targetClaim.isWilderness() || (GriefDefenderPlugin.getInstance().getVaultProvider() == null)) {
|
||||
|
Loading…
Reference in New Issue
Block a user