Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ifunction updateChecker(n: number):
- set {_csver} to line 1 from url "https://api.spigotmc.org/legacy/update.php?resource=35948/" parsed as a number
- set {_csv} to "%{csversion}%" parsed as a number
- if {_csver} is equal to {_csv}:
- message "&c&l(!) &7Successfully loaded the latest version of CommandSpy &8v&a%{csversion}%&7." to console
- else if {_csv} is greater than {_csver}:
- send "&c&l(!) &7Either you're running a beta version or you changed the version number! (&8v&a%{csversion}%&7)" to console
- else:
- send "&c&l(!) &7An update is available! (&a%{_csv}% &7-> &a%{_csver}%&7)" to console
- send "&c&l(!) &7Download it here: &fhttp://bit.ly/2BzFgKd" to console
- function updateCheckerCmd(p: player):
- set {_csver} to line 1 from url "https://api.spigotmc.org/legacy/update.php?resource=35948/" parsed as a number
- set {_csv} to "%{csversion}%" parsed as a number
- if {_csver} is equal to {_csv}:
- send "&c&l(!) &7You are currently running the latest version of CommandSpy &8v&a%{csversion}%&7." to {_p}
- else if {_csv} is greater than {_csver}:
- send "&c&l(!) &7Either you're running a beta version or you changed the version number! (&8v&a%{csversion}%&7)" to {_p}
- else:
- send "&c&l(!) &7An update is available! (&a%{_csv}% &7-> &a%{_csver}%&7)" to {_p}
- send "&c&l(!) &7Download it here: &fhttp://bit.ly/2BzFgKd" to {_p}
- command /commandspy [<player>]:
- aliases: /commands, /cspy
- permission: commandspy.use
- permission message: &e&l(!) You cannot use this command!
- trigger:
- if arg 1 is set:
- if {cs::%uuid of arg 1%} is set:
- clear {cs::%uuid of arg 1%}
- send "&c&l(!) Command spy has been disabled for %arg 1%."
- send "&c&l(!) Your command spy has been disabled." to arg 1
- else:
- set {cs::%uuid of arg 1%} to true
- send "&a&l(!) Your command spy has been enabled." to arg 1
- send "&a&l(!) Command spy has been enabled for %arg 1%."
- else:
- if {cs::%uuid of player%} is set:
- clear {cs::%uuid of player%}
- send "&c&l(!) Your command spy has been disabled."
- else:
- set {cs::%uuid of player%} to true
- send "&a&l(!) Your command spy has been enabled."
- command /commandspyupdater [<text>]:
- permission: commandspy.admin
- permission message: &e&l(!) You cannot use this command!
- trigger:
- if arg 1 is set:
- if arg 1 is "toggle":
- if {csupdater} is true:
- set {csupdater} to false
- send "&e&l(!) Successfully set the updater to false."
- else:
- set {csupdater} to true
- send "&e&l(!) Successfully set the updater to true."
- else if arg 1 is "check":
- updateCheckerCmd(player)
- else:
- send "&e&l(!) Unknown argument."
- else:
- if {csupdater} is true:
- set {csupdater} to false
- send "&e&l(!) Successfully set the updater to false."
- else:
- set {csupdater} to true
- send "&e&l(!) Successfully set the updater to true."
- on command:
- if sender is a player:
- loop all players:
- if {cs::%uuid of loop-player%} is set:
- if "%player%" is not "%loop-player%":
- send "&c&l(!) %player% executed the command &n/%complete command%&c&l." to loop-player
- on load:
- set {csversion} to "1.3"
- message "&4&l(!) Successfully loaded CommandSpy&7." to console
- on unload:
- message "&4&l(!) &7Successfully unloaded CommandSpy&7. Goodbye!" to console
- on quit:
- delete {cs::%uuid of player%}
- on skript load:
- if {csupdater} is true:
- updateChecker(1)
- every 5 minutes:
- if {csupdater} is true:
- updateChecker(1)
Advertisement
Add Comment
Please, Sign In to add comment