options: # Przedrostek wiadomości prefix: &9BIScraft.pl &8» # Czy mają być wysyłane wiadomości do wszystkich graczy o AFK? send-messages: true variables: {status::afk::%player%} = false function turnoff_afk(gracz: player): if {status::afk::%{_gracz}%} is true: if {@send-messages} is true: send "{@prefix} &a%{_gracz}% &7Nie jest juz AFK" to all players where [input is not {_gracz}] send title "&8» &aNie jestes juz AFK &8«" to {_gracz} send action bar "&6» &eNie jestes juz AFK &6«" to {_gracz} send "{@prefix} &aNie jestes juz AFK" to {_gracz} set {status::afk::%{_gracz}%} to false command /afk []: trigger: if {status::afk::%player%} is false: if {@send-messages} is true: send "{@prefix} &a%player% &7Jest teraz AFK" to all players where [input is not executor] send "{@prefix} &aJestes teraz AFK!" send title "&8» &aJestes teraz &7AFK &8«" to {_gracz} send action bar "&6» &eJestes obecnie AFK! &6«" to {_gracz} set {status::afk::%player%} to true else: turnoff_afk(player) on player move: turnoff_afk(player) on chat: turnoff_afk(player) on command: turnoff_afk(player) on damage: if {status::afk::%victim%} is true: cancel event send "{@prefix} &cTen gracz jest AFK!" to attacker if {status::afk::%attacker%} is true: set {status::afk::%attacker%} to false execute attacker command "afk"