Add exception for iron trapdoors and doors

This commit is contained in:
okx-code
2024-03-16 20:22:49 +00:00
parent ae6eaee183
commit e75bbbc756

View File

@@ -231,6 +231,11 @@ public class BlockListener implements Listener {
return; return;
} }
// Iron trapdoors and doors cannot be opened by right clicking on them
if (e.getClickedBlock().getType() == Material.IRON_TRAPDOOR || e.getClickedBlock().getType() == Material.IRON_DOOR) {
return;
}
if (e.getClickedBlock().getState() instanceof Container) { if (e.getClickedBlock().getState() instanceof Container) {
if (!rein.hasPermission(player, CitadelPermissionHandler.getChests())) { if (!rein.hasPermission(player, CitadelPermissionHandler.getChests())) {
e.setCancelled(true); e.setCancelled(true);