ignore item usage without a player. fix #12

This commit is contained in:
Flemmli97 2020-11-06 19:56:57 +01:00
parent 85c899f7ef
commit 996a78a73c

View File

@ -84,6 +84,8 @@ public class ItemInteractEvents {
return ActionResult.PASS;
boolean actualInClaim = !(claim instanceof Claim) || placePos.getY() >= ((Claim) claim).getDimensions()[4];
ServerPlayerEntity player = (ServerPlayerEntity) context.getPlayer();
if(player==null)
return ActionResult.PASS;
if (context.getStack().getItem() == Items.END_CRYSTAL) {
if (claim.canInteract(player, EnumPermission.ENDCRYSTALPLACE, placePos, false))
return ActionResult.PASS;