Advertisement
Delorium

Guard Enable/Disable/List (v1.1)

Aug 29th, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. # GUARD SYSTEM #
  2. # #
  3. # MADE BY Sn0wGo #
  4.  
  5. command /guard <text>:
  6. permission: guard.allow
  7. permission message: &b&lPrison &8| &7You are not a permitted guard!
  8. trigger:
  9. if arg 1 is "on":
  10. add player to {activeguards::*}
  11. add 1 to {guards}
  12. set {guard::%player%} to true
  13. broadcast "&b&lPrison &8| &b%player% &7has became an active guard!"
  14. set helmet slot of player to chain helmet named "&c&lGuard Helmet"
  15. set chestplate slot of player to chain chestplate named "&c&lGuard Chestplate"
  16. set leggings slot of player to chain leggings named "&c&lGuard Leggings"
  17. set boots slot of player to chain boots named "&c&lGuard Boots"
  18. set slot 0 of player to diamond sword named "&c&lGuard Sword"
  19. set slot 1 of player to bow named "&c&lGuard Bow"
  20. set slot 27 of player to arrow named "&c&lArrow"
  21. enchant slot 1 of player with power 5
  22. enchant slot 1 of player with infinity 1
  23. enchant slot 1 of player with flame 1
  24. enchant slot 0 of player with sharpness 4
  25. enchant tool of player with sharpness 4
  26. enchant helmet slot of player with protection 3
  27. enchant helmet slot of player with unbreaking 3
  28. enchant chestplate slot of player with protection 3
  29. enchant chestplate slot of player with unbreaking 3
  30. enchant leggings slot of player with protection 3
  31. enchant leggings slot of player with unbreaking 3
  32. enchant boots slot of player with protection 3
  33. enchant boots slot of player with unbreaking 3
  34. if arg 1 is "off":
  35. set {guard::*} to 0
  36. remove player from {activeguards::*}
  37. delete {guard::%player%}
  38. broadcast "&b&lPrison &8| &b%player% &7is no longer an active guard!"
  39. clear player's inventory
  40. if arg 1 is "list":
  41. if {activeguards::*} is not set:
  42. send " &b&lPrison Guards"
  43. send "&7Guards: 0" to player
  44. send "&7Guard Names: None Online" to player
  45. else:
  46. send " &b&lPrison Guards" to player
  47. send "&7Active Guards: %{guards}%" to player
  48. send "&7Guards Names: %{activeguards::*}%" to player
  49.  
  50. command /guard clear:
  51. permission: guard.admin
  52. permission message: &b&lError &8| &7You are not a guard administrator!
  53. trigger:
  54. clear {activeguards::*}
  55. clear {guards}
  56. loop all players:
  57. loop-player has permission "guard.allow":
  58. make loop-player execute "guard off"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement