Advertisement
LukaMC59

Untitled

Oct 6th, 2017
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. command /chatlock:
  2. permission: mountain.chatlock
  3. trigger:
  4. open chest with 1 rows named "&c&lChatLock" to player
  5. {chatlock} is set:
  6. format slot 4 of player with red wool named "&7ChatLock" with lore "&8Chat is currently &7locked&8!" to run [invoke "lock" from player]
  7. else:
  8. format slot 4 of player with green wool named "&7ChatLock" with lore "&8Chat is currently &7unl ocked&8!." to run [invoke "unlock" from player]
  9. on chat:
  10. {chatlock} is set:
  11. player is not op
  12. cancel event
  13. send "&8Chat has been &7locked&8!"
  14. sub "lock":
  15. set {chatlock} to 1
  16. send "&8Chat is now &7locked&8!" to parameter 1
  17. sub "unlock":
  18. delete {chatlock}
  19. send "&8Chat is now &7unlocked&8!" to parameter 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement