FrostedWeFall

Staff Chat

Nov 26th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. options:
  2. sc: &6[&l&bStaff&4Chat&r&6]&f
  3.  
  4. command staffchat:
  5. aliases: sc
  6. permission: staffchat.use
  7. permission message: &cYou do not have permission for that!
  8. trigger:
  9. open chest with 1 row named "&l&4Staff&2Chat" to player
  10. format slot 0 of player with green dye named "&aJoin!" with lore "&6Click to &ajoin!" to close then run [make player execute command "schat join"]
  11. format slot 1 of player with rose red named "&cLeave!" with lore "&6Click to &cLeave!" to close then run [make player execute command "schat leave"]
  12. format slot 8 of player with 160:14 named "&4Close!" with lore "&7Click to Close!" to close
  13.  
  14. command /schat <text>:
  15. permission: staffchat.use
  16. permission message: &cYou do not have permission for that!
  17. trigger:
  18. if arg-1 is "join":
  19. set {staffchat.%player%} to true
  20. message "{@sc} &6You have &aJoined &6the &l&4Staff&2Chat"
  21. if arg-1 is "leave":
  22. set {staffchat.%player%} to false
  23. message "{@sc} &6You have &cLefted &6the &l&4Staff&2Chat"
  24.  
  25. on chat:
  26. if {staffchat.%player%} is true:
  27. cancel event
  28. loop all players:
  29. if loop-player have permission "staffchat.see":
  30. send "{@sc} %player%> %message%" to loop-player
Add Comment
Please, Sign In to add comment