function reloadConfigu_antylogout(): if file "plugins/KAntyLogout/config.yml" doesn't exists: create file "plugins/KAntyLogout/config.yml" set "config.czas-antylogouta" to "20" in yaml file "plugins/KAntyLogout/config.yml" set "config.wiad-actionbar" to "true" in yaml file "plugins/KAntyLogout/config.yml" set "config.wiad-chat" to "false" in yaml file "plugins/KAntyLogout/config.yml" broadcast "Utworzono plik konfiguracyjny!" set {kantylogout::dlugosc} to single value "config.czas-antylogouta" get of "plugins/KAntyLogout/config.yml" parsed as number set {kantylogout::actionbar::status} to single value "config.wiad-actionbar" get of "plugins/KAntyLogout/config.yml" set {kantylogout::chat::status} to single value "config.wiad-chat" get of "plugins/KAntyLogout/config.yml" function send_actionBar(p: player, wiad: text): if {kantylogout::actionbar::status} is "true": set action bar of {_p} to "%{_wiad}%" on damage: if victim is skeleton or zombie or creeper or spider or cave spider or witch or zombie pigman or player: if attacker is skeleton or zombie or creeper or spider or cave spider or witch or zombie pigman or player: if {kantylogout::status::%victim%} is not set: set {kantylogout::status::%victim%} to "%victim%" set {kantylogout::czas::%victim%} to {kantylogout::dlugosc} if {kantylogout::chat::status} is "true": send "&cJestes podczas walki! Nie wylogowuj sie!" to victim if {kantylogout::chat::status} is "true": send "&cNie wylogowuj sie przez &e%{kantylogout::dlugosc}% &esekund&c!" to victim send_actionBar(victim, "&8=====&cNie wylogowuj sie przez &e%{kantylogout::czas::%victim%}% sekund&c!&8=====") else: set {kantylogout::czas::%attacker%} to {kantylogout::dlugosc} if {kantylogout::status::%attacker%} is not set: set {kantylogout::status::%attacker%} to "%attacker%" set {kantylogout::czas::%attacker%} to {kantylogout::dlugosc} if {kantylogout::chat::status} is "true": send "&cJestes podczas walki! Nie wylogowuj sie!" to attacker if {kantylogout::chat::status} is "true": send "&cNie wylogowuj sie przez &e%{kantylogout::dlugosc}% &esekund&c!" to attacker send_actionBar(attacker, "&8=====&cNie wylogowuj sie przez &e%{kantylogout::czas::%attacker%}% sekund&c!&8=====") else: set {kantylogout::czas::%attacker%} to {kantylogout::dlugosc} every 1 second: loop all players: if {kantylogout::status::%loop-player%} is set: remove 1 from {kantylogout::czas::%loop-player%} if {kantylogout::czas::%loop-player%} is 0: clear {kantylogout::status::%loop-player%} send_actionBar(loop-player, "&8=====&eWalka minela mozesz sie wylogowac!&8=====") if {kantylogout::chat::status} is "true": send "&eWalka minela mozesz sie wylogowac!" to loop-player else if {kantylogout::czas::%loop-player%} is bigger than 0: send_actionBar(loop-player, "&8=====&cNie wylogowuj sie przez &e%{kantylogout::czas::%loop-player%}% &esekund&c!&8=====") on quit: if {kantylogout::status::%player%} is set: kill player broadcast "&7Gracz &e&l%player% &7wylogowal sie podczas walki!" clear {kantylogout::status::%player%} set {kantylogout::czas::%player%} to 0 set {kantylogout::wylogowalSie::%player%} to "%player%" on join: if {kantylogout::wylogowalSie::%player%} is set: clear {kantylogout::wylogowalSie::%player%} send_actionBar(player, "&8=====&eOstatnio wylogowales sie podczas walki!&8=====") if {kantylogout::chat::status} is "true": send "&7Ostatnio wylogowales sie podczas walki!" on script unload: clear {kantylogout::*} on script load: reloadConfigu_antylogout()