-
Bug
-
Resolution: Invalid
-
Minor
-
None
-
None
-
if (bl.getType().equals(Material.TRAP_DOOR) && e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) { if (!pl.isOp()) { BlockState state = bl.getState(); TrapDoor trapd = (TrapDoor) state.getData(); boolean open = trapd.isOpen(); fc.logi("Trap Teste "+open); //TODO ajouté une var pour savoir si se bloc est deja en attente de changement fc.getServer().getScheduler().runTaskLaterAsynchronously(fc, new Runnable() { public void run() { trapd.setOpen(!open); state.update(); fc.logi("Trap Teste2 "+!open); } },40L); } }
if (bl.getType().equals(Material.TRAP_DOOR) && e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) { if (!pl.isOp()) { BlockState state = bl.getState(); TrapDoor trapd = (TrapDoor) state.getData(); boolean open = trapd.isOpen(); fc.logi( "Trap Teste " +open); //TODO ajouté une var pour savoir si se bloc est deja en attente de changement fc.getServer().getScheduler().runTaskLaterAsynchronously(fc, new Runnable () { public void run() { trapd.setOpen(!open); state.update(); fc.logi( "Trap Teste2 " +!open); } },40L); } }
-
This server is running CraftBukkit version git-Spigot-72c2605-709783c (MC: 1.10.2) (Implementing API version 1.10.2-R0.1-SNAPSHOT)
so i just wanna to reset the trap status, if she open and closed, she go back to open.
If she already open, and i close it she go back to open status