Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- {logout::%player%} = -1
- command /antylogout [<text>]:
- aliases: /logout, /walka, /czas
- trigger:
- if arg-1 is not set:
- if {logout::%player%} = -1 or 0:
- set {chatQuitOnLogout} to single value "AntyLogout.message.chatQuitOnLogout" get of "plugins/AntyLogout/config.yml"
- set {_zmienna::*} to yaml list "AntyLogout.message.commandLogoutFalse" from file "plugins/AntyLogout/config.yml"
- set {_commandLogoutFalse} to join {_zmienna::*} with "%nl%"
- replace "{0}" with "%{logout::%player%}%" in {_commandLogoutFalse}
- send "%colored {commandLogoutFalse}%"
- else:
- set {_zmienna::*} to yaml list "AntyLogout.message.commandLogoutTrue" from file "plugins/AntyLogout/config.yml"
- set {_commandLogoutTrue} to join {_zmienna::*} with "%nl%"
- replace "{0}" with "%{logout::%player%}%" in {_commandLogoutTrue}
- send "%colored {_commandLogoutTrue}%"
- every second:
- loop all players:
- if {logout::%loop-player%} = 0:
- remove 1 from {logout::%loop-player%}
- if {opcja} = "1":
- set action bar of loop-player to "&a&lANTYLOGOUT"
- if {opcja} = "2":
- send "%colored {chatAntyLogoutFalse}%" to loop-player
- if {opcja} = "3":
- wipe loop-player's sidebar
- stop
- if {logout::%loop-player%} > 0:
- if {opcja} = "1":
- set action bar of loop-player to "&4&lANTYLOGOUT &7(&c%{logout::%loop-player%}%.&k00&csek&7)"
- remove 1 from {logout::%loop-player%}
- if {opcja} = "2":
- remove 1 from {logout::%loop-player%}
- stop
- if {opcja} = "3":
- remove 1 from {logout::%loop-player%}
- set name of sidebar of loop-player to "&4&lANTYLOGOUT!"
- set score "&7Czas:" in sidebar of loop-player to {logout::%loop-player%}
- stop
- on damage:
- if "%attacker%" parsed as offlineplayer is not online:
- stop
- if damage cause is fall or fire:
- stop
- if {opcja} = "2":
- if {logout::%victim%} < 0:
- send "%colored {chatAntyLogoutTrue}%" to victim
- set {logout::%victim%} to 20
- on quit:
- if {logout::%player%} > 0:
- kill player
- replace "{0}" with "%player%" in {chatQuitOnLogout}
- broadcast "%colored {chatQuitOnLogout}%"
- set {logout::%player%} to -1
- teleport player to {spawn}
- else:
- stop
- on death:
- delete {logout::%player%}
- on join:
- delete {logout::%player%}
- on load:
- set {opcja} to single value "AntyLogout.options" get of "plugins/AntyLogout/config.yml"
- set {chatAntyLogoutFalse} to single value "AntyLogout.message.chatAntyLogoutFalse" get of "plugins/AntyLogout/config.yml"
- set {chatAntyLogoutTrue} to single value "AntyLogout.message.chatAntyLogoutTrue" get of "plugins/AntyLogout/config.yml"
- set {chatQuitOnLogout} to single value "AntyLogout.message.chatQuitOnLogout" get of "plugins/AntyLogout/config.yml"
Advertisement
Add Comment
Please, Sign In to add comment