Date: 2020/04/18 09:39:59 UTC-07:00
Type: Denizen Script
Item_Handler:
type: world
debug: true
events:
on player clicks block with IronDoorKey bukkit_priority:lowest:
- determine passively cancelled
- if <context.location.material.name> == iron_door:
- if !<context.location.material.switched>:
- playsound BLOCK_IRON_DOOR_OPEN <context.location>
- switch <context.location> state:on
- wait 2s
#@ Check if the door was removed
- if <context.location.material.name> == iron_door:
- switch <context.location> state:off
#@ Check if door actually closed
- wait 1t
- if !<context.location.material.switched>:
- playsound BLOCK_IRON_DOOR_CLOSE <context.location>