put armor stand attack check under BREAKNONLIVING

This commit is contained in:
Flemmli97 2022-02-01 18:51:19 +01:00
parent 828a406702
commit 552347874c

View File

@ -197,7 +197,7 @@ public class EntityInteractEvents {
BlockPos pos = entity.blockPosition();
IPermissionContainer claim = storage.getForPermissionCheck(pos);
if (claim != null) {
if (!(entity instanceof LivingEntity))
if (entity instanceof ArmorStand || !(entity instanceof LivingEntity))
return claim.canInteract(player, PermissionRegistry.BREAKNONLIVING, pos, message) ? InteractionResult.PASS : InteractionResult.FAIL;
if (entity instanceof Player)
return claim.canInteract(player, PermissionRegistry.HURTPLAYER, pos, message) ? InteractionResult.PASS : InteractionResult.FAIL;