options:
blocks: ender chest
cmds: "home" or "ps" or "spawn"
time: 20
on load:
delete {AntyLogaut::*}
on damage of player:
if {AntyLogaut::%victim%} is not set:
set {AntyLogaut::%victim%} to {@time}
send "&cJestes podczas walki!" to victim
while {AntyLogaut::%victim%} is set:
if {AntyLogaut::%victim%} > 0:
set action bar of victim to "&7AntyLogaut: &c%{AntyLogaut::%victim%}%&cs"
wait 1 second
remove 1 from {AntyLogaut::%victim%}
else:
send "&aSkonczyles Walczyc!" to victim
set action bar of victim to "&7AntyLogaut: &aSkonczyles walczyc"
delete {AntyLogaut::%victim%}
else:
set {AntyLogaut::%victim%} to {@time}
set action bar of victim to "&7AntyLogaut: &c%{AntyLogaut::%victim%}%&cs"
on command:
if {AntyLogaut::%player%} is set:
if command is {@cmds}:
cancel event
send "&7Nie mozesz uzyc tej komendy podczas walki! &6(%command%)"
on quit:
if {AntyLogaut::%player%} is set:
kill player
ban player due to "&7Logaut podczas walki!" for 24 hours