Advertisement
RedstoneKing106

Untitled

Jan 9th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. Command /worlds:
  2. trigger:
  3. open chest with 6 rows named "&6&lWorlds" to player
  4. set {_c} to 0
  5. loop all worlds:
  6. loop-world is not "world" or "world_nether" or "world_the_end"
  7. {motd.%loop-world%} is not set:
  8. set {motd.%loop-world%} to "No MOTD set."
  9. set {_players} to 0
  10. loop all players:
  11. world of loop-player is loop-world
  12. add 1 to {_players}
  13. {_players} > 0
  14. set slot {_c} of player's current inventory to grass block named "&6%loop-world%" with lore "&7||&f%colored {motd.%loop-world%}%||&7Players: &e%{_players}%||&7Click to &eteleport!"
  15. add 1 to {_c}
  16.  
  17. on inventory click:
  18. name of player's current inventory is "&6&lWorlds":
  19. name of clicked item is set
  20. set {_c} to name of clicked item
  21. replace every "&6" in {_c} with ""
  22. set {_players} to 0
  23. {whitelist.%{_c}%} is not "on":
  24. clear the player's inventory
  25. execute console command "mv load %{_c}%"
  26. send "&6&lCUBEHOST &8ยป &7Sending you to &e%{_c}%"
  27. execute console command "mvtp %player% %{_c}%"
  28. broadcast "&e%player% &7joined the world." to the player's world
  29. else:
  30. send "&c&lERROR! &7This world is whitelisted."
  31. close the player's inventory
  32.  
  33. every 10 seconds:
  34. loop all worlds:
  35. set {_c} to 0
  36. loop all players:
  37. world of loop-player is loop-world
  38. add 1 to {_c}
  39. {_c} < 1
  40. execute console command "mv unload %loop-world%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement