fixed double doors opening when sneaking

This commit is contained in:
Elias Müller 2024-08-31 12:14:48 +02:00
parent d21f009f7d
commit 50e4192e32

View File

@ -17,6 +17,7 @@ public class OnDoorInteractListener extends ApplianceListener<DoubleDoor> {
if(!event.hasBlock()) return;
if(!Objects.equals(event.getHand(), EquipmentSlot.HAND)) return;
if(!event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) return;
if(event.getPlayer().isSneaking()) return;
Block clickedBlock = event.getClickedBlock();
if(clickedBlock == null) return;
if(clickedBlock.getType().equals(Material.IRON_DOOR)) return;