fixed double doors opening when sneaking
This commit is contained in:
parent
d21f009f7d
commit
50e4192e32
@ -17,6 +17,7 @@ public class OnDoorInteractListener extends ApplianceListener<DoubleDoor> {
|
|||||||
if(!event.hasBlock()) return;
|
if(!event.hasBlock()) return;
|
||||||
if(!Objects.equals(event.getHand(), EquipmentSlot.HAND)) return;
|
if(!Objects.equals(event.getHand(), EquipmentSlot.HAND)) return;
|
||||||
if(!event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) return;
|
if(!event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) return;
|
||||||
|
if(event.getPlayer().isSneaking()) return;
|
||||||
Block clickedBlock = event.getClickedBlock();
|
Block clickedBlock = event.getClickedBlock();
|
||||||
if(clickedBlock == null) return;
|
if(clickedBlock == null) return;
|
||||||
if(clickedBlock.getType().equals(Material.IRON_DOOR)) return;
|
if(clickedBlock.getType().equals(Material.IRON_DOOR)) return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user