change the permission of some blocks (PROJECTILES) on direct interaction to OPENCONTAINER

This commit is contained in:
Flemmli97 2021-05-31 14:21:11 +02:00
parent e82a8b26e9
commit b2830bea2c

View File

@ -78,6 +78,8 @@ public class BlockInteractEvents {
if (ConfigHandler.config.ignoredBlocks.contains(id.toString()))
return ActionResult.PASS;
ClaimPermission perm = ObjectToPermissionMap.getFromBlock(state.getBlock());
if (perm == PermissionRegistry.PROJECTILES)
perm = PermissionRegistry.OPENCONTAINER;
//Pressureplate handled elsewhere
if (perm != null && perm != PermissionRegistry.PRESSUREPLATE) {
if (claim.canInteract(player, perm, hitResult.getBlockPos(), true))