Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Command /worlds:
- trigger:
- open chest with 6 rows named "&6&lWorlds" to player
- set {_c} to 0
- loop all worlds:
- loop-world is not "world" or "world_nether" or "world_the_end"
- {motd.%loop-world%} is not set:
- set {motd.%loop-world%} to "No MOTD set."
- set {_players} to 0
- loop all players:
- world of loop-player is loop-world
- add 1 to {_players}
- {_players} > 0
- 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!"
- add 1 to {_c}
- on inventory click:
- name of player's current inventory is "&6&lWorlds":
- name of clicked item is set
- set {_c} to name of clicked item
- replace every "&6" in {_c} with ""
- set {_players} to 0
- {whitelist.%{_c}%} is not "on":
- clear the player's inventory
- execute console command "mv load %{_c}%"
- send "&6&lCUBEHOST &8ยป &7Sending you to &e%{_c}%"
- execute console command "mvtp %player% %{_c}%"
- broadcast "&e%player% &7joined the world." to the player's world
- else:
- send "&c&lERROR! &7This world is whitelisted."
- close the player's inventory
- every 10 seconds:
- loop all worlds:
- set {_c} to 0
- loop all players:
- world of loop-player is loop-world
- add 1 to {_c}
- {_c} < 1
- execute console command "mv unload %loop-world%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement