Paste #67652: Untitled Paste

Date: 2020/04/18 09:39:59 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18


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>