Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- {logout::%player%} = -1
- #=====================================================================#
- # Komendy #
- #=====================================================================#
- command /antylogout [<offlineplayer>]:
- trigger:
- if arg-1 is not set:
- if {logout::%player%} = -1 or 0:
- set {commandLogoutFalse} to single value "AntyLogout.message.commandLogoutFalse" get of "plugins/AntyLogout/config.yml"
- send "%colored {commandLogoutFalse}%"
- else:
- set {commandLogoutTrue} to single value "AntyLogout.message.commandLogoutTrue" get of "plugins/AntyLogout/config.yml"
- replace "{0}" with "%{logout::%player%}%" in {commandLogoutTrue}
- send "%colored {commandLogoutTrue}%"
- #=====================================================================#
- # Licznik #
- #=====================================================================#
- every second:
- loop all players:
- if {logout::%loop-player%} = 0:
- remove 1 from {logout::%loop-player%} #Odejmuje 1 zeby nic sie nie bugowalo.
- if {opcja} = "1":
- set action bar of loop-player to "&4&lANTYLOGOUT &7(&a0sek.&7)"
- 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 {opcja} = "2":
- if {logout::%victim%} < 0:
- send "%colored {chatAntyLogoutTrue}%" to victim
- if {logout::%attacker%} < 0:
- send "%colored {chatAntyLogoutTrue}%" to attacker
- set {logout::%victim%} to {time}
- set {logout::%attacker%} to {time}
- #=====================================================================#
- # Logout podczas walki #
- #=====================================================================#
- on quit:
- if {logout::%player%} > 0:
- kill player
- replace "{0}" with "%player%" in {chatQuitOnLogout}
- broadcast "%colored {chatQuitOnLogout}%"
- set {logout::%player%} to -1
- else:
- stop
- on join:
- set {logout::%player%} to -1
- #=====================================================================#
- # CONFIG (YML) #
- #=====================================================================#
- on load:
- if folder "plugins/AntyLogout" doesn't exists:
- create folder "plugins/AntyLogout"
- if file "plugins/AntyLogout/config.yml" doesn't exists:
- create file "plugins/AntyLogout/config.yml"
- download from "https://pastebin.com/raw/x7GtqPNS" to "plugins/AntyLogout/config.yml"
- set {opcja} to single value "AntyLogout.options" get of "plugins/AntyLogout/config.yml"
- set {time} to single value "AntyLogout.time" 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