So um, I done some research and found a Door object in bukkit, with an open and close option. I tried casting a blockstate to a door with no success. So how do I do this?
Check if the block is equal to a door and if yes then cast the block to a door like this Door thedoor = (Door) block; I think this would work
Plo124 try casting Openable I don't know if you need to cast it to block.getState() or to block.getState().getData() though.