Hello,
I didnt find a class for doors and any method to open/close doors or gates using my code.
On bukkit:
if (isDoor(block)){
byte data = block.getData();
if ((data & 0x8) == 0x8 && !isTrapDoor(block)) {
block = block.getRelative(BlockFace.DOWN);
data = block.getData();
}
if (isDoorClosed(block) && !isTrapDoor(block)) {
data = (byte) (data | 0x4);
}
block.setData(data, true);
}
How to do this on Sponge, if possible?
Thanks!