Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # GUARD SYSTEM #
- # #
- # MADE BY Sn0wGo #
- command /guard <text>:
- permission: guard.allow
- permission message: &b&lPrison &8| &7You are not a permitted guard!
- trigger:
- if arg 1 is "on":
- add player to {activeguards::*}
- add 1 to {guards}
- set {guard::%player%} to true
- broadcast "&b&lPrison &8| &b%player% &7has became an active guard!"
- set helmet slot of player to chain helmet named "&c&lGuard Helmet"
- set chestplate slot of player to chain chestplate named "&c&lGuard Chestplate"
- set leggings slot of player to chain leggings named "&c&lGuard Leggings"
- set boots slot of player to chain boots named "&c&lGuard Boots"
- set slot 0 of player to diamond sword named "&c&lGuard Sword"
- set slot 1 of player to bow named "&c&lGuard Bow"
- set slot 27 of player to arrow named "&c&lArrow"
- enchant slot 1 of player with power 5
- enchant slot 1 of player with infinity 1
- enchant slot 1 of player with flame 1
- enchant slot 0 of player with sharpness 4
- enchant tool of player with sharpness 4
- enchant helmet slot of player with protection 3
- enchant helmet slot of player with unbreaking 3
- enchant chestplate slot of player with protection 3
- enchant chestplate slot of player with unbreaking 3
- enchant leggings slot of player with protection 3
- enchant leggings slot of player with unbreaking 3
- enchant boots slot of player with protection 3
- enchant boots slot of player with unbreaking 3
- if arg 1 is "off":
- set {guard::*} to 0
- remove player from {activeguards::*}
- delete {guard::%player%}
- broadcast "&b&lPrison &8| &b%player% &7is no longer an active guard!"
- clear player's inventory
- if arg 1 is "list":
- if {activeguards::*} is not set:
- send " &b&lPrison Guards"
- send "&7Guards: 0" to player
- send "&7Guard Names: None Online" to player
- else:
- send " &b&lPrison Guards" to player
- send "&7Active Guards: %{guards}%" to player
- send "&7Guards Names: %{activeguards::*}%" to player
- command /guard clear:
- permission: guard.admin
- permission message: &b&lError &8| &7You are not a guard administrator!
- trigger:
- clear {activeguards::*}
- clear {guards}
- loop all players:
- loop-player has permission "guard.allow":
- make loop-player execute "guard off"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement