function reload_configu(): if file "plugins/KStoniarka/config.yml" doesn't exists: create file "plugins/KStoniarka/config.yml" download from "https://pastebin.com/raw/M3zEpE1G" to "plugins/KStoniarka/config.yml" broadcast "&7Utworzono plik konfiguracyjny!" if file "plugins/KStoniarka/messages.yml" doesn't exists: create file "plugins/KStoniarka/messages.yml" download from "https://pastebin.com/raw/2PPhs6xk" to "plugins/KStoniarka/messages.yml" broadcast "&7Utworzono plik z wiadomosciami!" set {kstoniarka::regeneracja::stonea} to single value "config.czas-regeneracji-stonea" get of "plugins/KStoniarka/config.yml" parsed as number set {kstoniarka::regeneracja::obsydianu} to single value "config.czas-regeneracji-obsydianu" get of "plugins/KStoniarka/config.yml" parsed as number loop 9 times: set {kstoniarka::crafting::slot::%loop-number%} to single value "crafting.slot-%loop-number%" get of "plugins/KStoniarka/config.yml" parsed as item set {kstoniarka::crafting::nazwa} to single value "crafting.nazwa-stoniarki" get of "plugins/KStoniarka/config.yml" set {kstoniarka::crafting::opis} to single value "crafting.opis-stoniarki" get of "plugins/KStoniarka/config.yml" set {kstoniarka::wiadomosc::error-wrong-block} to single value "messages.error-wrong-block" get of "plugins/KStoniarka/messages.yml" set {kstoniarka::wiadomosc::error-mode-set} to single value "messages.error-mode-set" get of "plugins/KStoniarka/messages.yml" set {kstoniarka::wiadomosc::change-mode-obsidian} to single value "messages.change-mode-obsidian" get of "plugins/KStoniarka/messages.yml" set {kstoniarka::wiadomosc::change-mode-stone} to single value "messages.change-mode-stone" get of "plugins/KStoniarka/messages.yml" set {kstoniarka::wiadomosc::place-stoniarka} to single value "messages.place-stoniarka" get of "plugins/KStoniarka/messages.yml" set {kstoniarka::wiadomosc::error-block-above} to single value "messages.error-block-above" get of "plugins/KStoniarka/messages.yml" set {kstoniarka::wiadomosc::break-stoniarka} to single value "messages.break-stoniarka" get of "plugins/KStoniarka/messages.yml" register new shaped recipe for end stone named "%coloured {kstoniarka::crafting::nazwa}%" with lore "%coloured {kstoniarka::crafting::opis}%" using {kstoniarka::crafting::slot::1}, {kstoniarka::crafting::slot::2}, {kstoniarka::crafting::slot::3}, {kstoniarka::crafting::slot::4}, {kstoniarka::crafting::slot::5}, {kstoniarka::crafting::slot::6}, {kstoniarka::crafting::slot::7}, {kstoniarka::crafting::slot::8}, {kstoniarka::crafting::slot::9} on script load: reload_configu() on place: if block under event-block is end stone: if event-block is stone: if {kstoniarka::tryb::stoniarki::%event-block%} is set: send "%coloured {kstoniarka::wiadomosc::error-mode-set}%" cancel event else: send "%coloured {kstoniarka::wiadomosc::change-mode-stone}%" set {kstoniarka::tryb::stoniarki::%event-block%} to "stone" stop if event-block is obsidian: if {kstoniarka::tryb::stoniarki::%event-block%} is set: send "%coloured {kstoniarka::wiadomosc::error-mode-set}%" cancel event else: send "%coloured {kstoniarka::wiadomosc::change-mode-obsidian}%" set {kstoniarka::tryb::stoniarki::%event-block%} to "obsidian" stop else: cancel event send "%coloured {kstoniarka::wiadomosc::error-wrong-block}%" stop on place end stone: if block above is air: if block under is end stone: stop else: send "%coloured {kstoniarka::wiadomosc::place-stoniarka}%" stop else: cancel event send "%coloured {kstoniarka::wiadomosc::error-block-above}%" on break: if event-block is end stone: set block above to air clear {kstoniarka::tryb::stoniarki::%block above event-block%} send "%coloured {kstoniarka::wiadomosc::break-stoniarka}%" if event-block is stone: if block under event-block is end stone: set {kstoniarka::regeneracja::wtoku::%event-block%} to "tak" loop {kstoniarka::regeneracja::stonea} times: wait 1 tick clear {kstoniarka::regeneracja::wtoku::%event-block%} if event-block is air: if block under event-block is end stone: if {kstoniarka::wtoku::%event-block%} is set: stop else: set event-block to stone if event-block is obsidian: if block under event-block is end stone: set {kstoniarka::regeneracja::wtoku::%event-block%} to "tak" loop {kstoniarka::regeneracja::obsydianu} times: wait 1 tick clear {kstoniarka::regeneracja::wtoku::%event-block%} if event-block is air: if block under event-block is end stone: if {kstoniarka::wtoku::%event-block%} is set: stop else: set event-block to obsidian command /stonereload: permission: kstoniarka.stonereload permission message: &cNie posiadasz uprawnien! &8(&7KStoniarka.StoneReload&8) trigger: reload_configu() send "&7Jezeli zmieniles crafting zretartuj serwer lub uzyj komendy /reload!" on script unload: clear {kstoniarka::*}