options: czasrespskrzynki: 1 real hour every {@czasrespskrzynki}: if {respskrzynki} is not set: send "&cNie ustawiono skrzynki z dropem!" to console loop all players: if loop-player has permission "skrzynia.wiadomosc": send "&cNie ustawiono skrzynki z dropem!" to loop-player stop else: set {_a::*} to yaml list "skrzyniadrop" from file "skrzynia/config.yml" if {_a::*} is not set: add "5 iron ingot" to yaml list "skrzyniadrop" from file "skrzynia/config.yml" else: set block at {respskrzynki} to chest wait 0.5 second set {_a} to a random element out of {_a::*} set {_b} to "%{_a}%" parsed as item broadcast "Wylosowano %{_b}%" add {_b} to the inventory of block at {respskrzynki} wait 20 seconds clear inventory of the block at {respskrzynki} set block at {respskrzynki} to air on place: if player's tool is chest: if player is sneaking: if player has permission "skrzynia.ustaw": send "&aPostawiono skrzynke" set {respskrzynki} to location of event-block stop on break: if event-block is chest: if location of event-block is {respskrzynki}: if player is sneaking: if player has permission "skrzynia.ustaw": set block to air delete {respskrzynki} send "&cZniszczono skrzynke!" stop if event-block is chest: if location of event-block is {respskrzynki}: if player has permission "skrzynia.ustaw": cancel event send "&cAby rozwalic skrzynke, przytrzymaj shifta" stop on right click: if clicked block is chest: if location of clicked block is {respskrzynki}: set event-block to air stop