Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Read 'license.txt' before using this Skript please
- options:
- config: plugins/Lobby/config.yml
- #-----------------------------------{ Functions / Startup }-----------------------------------
- function startUp():
- clear {config.list.interaction::*}
- clear {config.list.join::*}
- clear {config.list.prefixes::*}
- clear {config.list.prefixes.default::*}
- add "trapdoor", "armor_stand", "item_frame", "button", "furnace", "chest", "trapped_chest", "crafting_table" and "door" to {config.list.interaction::*}
- add "teleportLobby", "clearJoinMessage" and "clearPlayer" to {config.list.join::*}
- add "Server.logo", "Server.chatColor", "Server.arcatedColor", "Lobby.logo", "Lobby.chatColor" and "Lobby.arcatedColor" to {config.list.prefixes::*}
- add "&e&lServer &7➤", "&f", "&e", "&d&lLobby &7➤", "&f" and "&d" to {config.list.prefixes.default::*}
- if file "{@config}" doesn't exist:
- create file "{@config}"
- loop {config.list.prefixes::*}:
- set yml value "Lobby.Prefix.%loop-value%" of file "{@config}" to "%{config.list.prefixes.default::%loop-index%}%"
- loop {config.list.interaction::*}:
- set yml value "Lobby.Interaction.%loop-value%" of file "{@config}" to false
- loop {config.list.join::*}:
- set yml value "Lobby.Join.%loop-value%" of file "{@config}" to true
- set {lobby.logo.Server} to yml value "Lobby.Prefix.Server.logo" of file "{@config}"
- set {lobby.chatColor.Server} to yml value "Lobby.Prefix.Server.chatColor" of file "{@config}"
- set {lobby.arcatedColor.Server} to yml value "Lobby.Prefix.Server.arcatedColor" of file "{@config}"
- set {lobby.logo.Lobby} to yml value "Lobby.Prefix.Lobby.logo" of file "{@config}"
- set {lobby.chatColor.Lobby} to yml value "Lobby.Prefix.Lobby.chatColor" of file "{@config}"
- set {lobby.arcatedColor.Lobby} to yml value "Lobby.Prefix.Lobby.arcatedColor" of file "{@config}"
- #logo: %{lobby.arcatedColor.Server}%&lServer &7➤&f
- #lobby: %{lobby.arcatedColor.Lobby}%Lobby &7➤&f
- #set yml value "Lobby.Prefix.Server.logo" of file "{@config}" to "%{lobby.arcatedColor.Server}%&lServer &7➤&f"
- #set yml value "Lobby.Prefix.Server.chatColor" of file "{@config}" to "&f"
- #set yml value "Lobby.Prefix.Server.arcatedColor" of file "{@config}" to "%{lobby.arcatedColor.Server}%"
- #set yml value "Lobby.Prefix.Lobby.logo" of file "{@config}" to "%{lobby.arcatedColor.Lobby}%Lobby &7➤&f"
- #set yml value "Lobby.Prefix.Lobby.chatColor" of file "{@config}" to "&f"
- #set yml value "Lobby.Prefix.Lobby.arcatedColor" of file "{@config}" to "%{lobby.arcatedColor.Lobby}%"
- set yml value "Lobby.Join.Compass.give" of file "{@config}" to true
- set yml value "Lobby.Join.Compass.item" of file "{@config}" to "compass"
- set yml value "Lobby.Join.Compass.name" of file "{@config}" to "&9Compass"
- set yml value "Lobby.Join.Compass.lore" of file "{@config}" to "&7Click to use"
- set yml value "Lobby.Join.Compass.GUI.name" of file "{@config}" to "&9Minigames"
- set yml value "Lobby.Join.Compass.GUI.rows" of file "{@config}" to 3
- set yml value "Lobby.Join.teleportLobby" of file "{@config}" to true
- set yml value "Lobby.Join.Message.clear" of file "{@config}" to true
- set yml value "Lobby.Join.Message.message" of file "{@config}" to "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%[player] joined the lobby!"
- else:
- set {lobby.logo.Server} to yml value "Lobby.Prefix.Server.logo" of file "{@config}"
- set {lobby.chatColor.Server} to yml value "Lobby.Prefix.Server.chatColor" of file "{@config}"
- set {lobby.arcatedColor.Server} to yml value "Lobby.Prefix.Server.arcatedColor" of file "{@config}"
- set {lobby.logo.Lobby} to yml value "Lobby.Prefix.Lobby.logo" of file "{@config}"
- set {lobby.chatColor.Lobby} to yml value "Lobby.Prefix.Lobby.chatColor" of file "{@config}"
- set {lobby.arcatedColor.Lobby} to yml value "Lobby.Prefix.Lobby.arcatedColor" of file "{@config}"
- loop {config.list.prefixes::*}:
- if yml value "Lobby.Prefix.%loop-value%" of file "{@config}" is not set:
- set yml value "Lobby.Prefix.%loop-value%" of file "{@config}" to "%{config.list.prefixes.default::%loop-index%}%"
- loop {config.list.interaction::*}:
- if yml value "Lobby.Interaction.%loop-value%" of file "{@config}" is not set:
- set yml value "Lobby.Interaction.%loop-value%" of file "{@config}" to false
- loop {config.list.join::*}:
- if yml value "Lobby.Join.%loop-value%" of file "{@config}" is not set:
- set yml value "Lobby.Join.%loop-value%" of file "{@config}" to true
- if yml value "Lobby.Join.Compass.give" of file "{@config}" is not set:
- set yml value "Lobby.Join.Compass.give" of file "{@config}" to true
- if yml value "Lobby.Join.Compass.item" of file "{@config}" is not set:
- set yml value "Lobby.Join.Compass.item" of file "{@config}" to "compass"
- if yml value "Lobby.Join.Compass.name" of file "{@config}" is not set:
- set yml value "Lobby.Join.Compass.name" of file "{@config}" to "&9Minigames"
- if yml value "Lobby.Join.Compass.lore" of file "{@config}" is not set:
- set yml value "Lobby.Join.Compass.lore" of file "{@config}" to "&7Click to use"
- if yml value "Lobby.Join.Compass.GUI.name" of file "{@config}" is not set:
- set yml value "Lobby.Join.Compass.GUI.name" of file "{@config}" to "&9Minigames"
- if yml value "Lobby.Join.Compass.GUI.rows" of file "{@config}" is not set:
- set yml value "Lobby.Join.Compass.GUI.rows" of file "{@config}" to 3
- if yml value "Lobby.Join.teleportLobby" of file "{@config}" is not set:
- set yml value "Lobby.Join.teleportLobby" of file "{@config}" to true
- if yml value "Lobby.Join.Message.clear" of file "{@config}" is not set:
- set yml value "Lobby.Join.Message.clear" of file "{@config}" to true
- if yml value "Lobby.Join.Message.message" of file "{@config}" is not set:
- set yml value "Lobby.Join.Message.message" of file "{@config}" to "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%[player] joined the lobby!"
- if yml value "Lobby.Join.clearPlayer" of file "{@config}" is not set:
- set yml value "Lobby.Join.clearPlayer" of file "{@config}" to true
- setupLobby()
- on enable:
- startUp()
- #-----------------------------------{ Functions / Disable }-----------------------------------
- #-----------------------------------{ Functions / Join and Quit }-----------------------------------
- on join:
- if {lobby.location} is set:
- if {lobby.join.teleportLobby} is true:
- wait 2 ticks
- teleport player to {lobby.location}
- #reveal player for all players in world of player
- #reveal all players in world of player for player
- if {lobby.join.clearJoinMessage} is true:
- set join message to ""
- if {lobby.joinMessage} is true:
- set {_message} to {lobby.joinMessage}
- replace all "[player]" in {_message} with name of player
- send "%{_message}%" to all players in world of player
- if {lobby.join.clearPlayer} is true:
- clear player's inventory
- set player's level to 0
- if {lobby.join.giveCompass} is true:
- set slot 4 of player to {lobby.items.compass}
- if {lobby.buildmode.removeLeft.%player%} is set:
- delete {lobby.buildmode.removeLeft.%player%}
- send "%{lobby.logo.server}% %{lobby.chatColor.Lobby}%Your buildmode has been %{lobby.arcatedColor.Lobby}%disabled %{lobby.chatColor.Lobby}%in the %{lobby.arcatedColor.Lobby}%lobby %{lobby.chatColor.Lobby}%because you left."
- on quit:
- if {lobby.buildmode.%player%} is true:
- delete {lobby.buildmode.%player%}
- set {lobby.buildmode.removeLeft.%player%} to true
- on disconnect:
- if {lobby.buildmode.%player%} is true:
- delete {lobby.buildmode.%player%}
- set {lobby.buildmode.removeLeft.%player%} to true
- #-----------------------------------{ Functions / Compass }-----------------------------------
- function closeEvent(p: Player, command: Boolean, accept: String, acceptValue: String, minigame: String):
- if {_command} is true:
- execute {_p} command {_accept}
- wait 3 ticks
- if {_acceptValue} is not "delete":
- execute {_p} command "/lobbycompass gui %{_minigame}%"
- else:
- send "%{_accept}%" to {_p}
- set {lobby.chatEvent.%{_p}%} to {_acceptValue}
- set {lobby.chatEventMinigame.%{_p}%} to {_minigame}
- function closeInventory(p: Player, deny: String, minigame: String):
- send "%{_deny}%" to {_p}
- wait 2 ticks
- execute {_p} command "/Lobbycompass gui %{_minigame}%"
- function setupLobby():
- set {_compassItem} to yml value "Lobby.Join.Compass.item" of file "{@config}"
- set {_compassName} to yml value "Lobby.Join.Compass.name" of file "{@config}"
- set {_compassLore} to yml value "Lobby.Join.Compass.lore" of file "{@config}"
- if {_compassItem} parsed as an item type is not set:
- send "%{lobby.logo.Lobby}% &4[ERROR] %{lobby.arcatedColor.Lobby}%%{_compassItem}% %{lobby.chatColor.Lobby}%is not an item! Setting the item to a compass..." to console
- set {_compassItem} to a compass
- if {_compassName} is not set:
- send "%{lobby.logo.Lobby}% &4[ERROR] %{lobby.chatColor.Lobby}%There is no %{lobby.arcatedColor.Lobby}%name %{lobby.chatColor.Lobby}%given for the compass!" to console
- set {_compassName} to name of {_compassItem}
- if {_compassLore} is not set:
- send "%{lobby.logo.Lobby}% &4[ERROR] %{lobby.chatColor.Lobby}%There is no %{lobby.arcatedColor.Lobby}%lore %{lobby.chatColor.Lobby}%given for the compass!" to console
- set {_compassLore} to ""
- loop {config.list.interaction::*}:
- set {lobby.interaction.%loop-value%} to yml value "Lobby.Interaction.%loop-value%" of file "{@config}"
- loop {config.list.join::*}:
- set {lobby.join.%loop-value%} to yml value "Lobby.Join.%loop-value%" of file "{@config}"
- set {lobby.items.compass} to ({_compassItem} parsed as an item type) named "%{_compassName}%" with lore "%{_compassLore}%"
- set {lobby.items.compass.guiName} to yml value "Lobby.Join.Compass.GUI.name" of file "{@config}"
- set {lobby.items.compass.rows} to yml value "Lobby.Join.Compass.GUI.rows" of file "{@config}"
- set {lobby.join.joinMessage} to yml value "Lobby.Join.Message.message" of file "{@config}"
- set {lobby.join.giveCompass} to yml value "Lobby.Join.Compass.give" of file "{@config}"
- function createCompassGUI(p: Player, gname: String, rows: Integer, slot1: Integer, slot2: Integer, item1: Item, item2: Item, i1name: String, i2name: String, accept: String, acceptValue: String, deny: String, minigame: String, command: Boolean):
- wait 2 ticks
- open chest with {_rows} rows named {_gname} to {_p}
- wait 2 ticks
- set name of {_item1} to {_i1name}
- set name of {_item2} to {_i2name}
- format slot {_slot1} of {_p} with {_item1} to close then run [closeEvent({_p}, {_command}, {_accept}, {_acceptValue}, {_minigame})]
- format slot {_slot2} of {_p} with {_item2} to close then run [closeInventory({_p}, {_deny}, {_minigame})]
- function teleportMinigame(p: Player, minigame: String):
- if {lobby.minigames.%{_minigame}%} is set:
- teleport {_p} to {lobby.minigames.%{_minigame}%.spawn}
- else:
- send "%{lobby.logo.server}% %{lobby.chatColor.Server}%Error whilst connecting to %{lobby.arcatedColor.Server}%%{_minigame}%%{lobby.chatColor.Server}%! Please report this error to staff." to {_p}
- function openCompass(p: Player):
- if {lobby.items.compass.rows} is not set:
- set {lobby.items.compass.rows} to 3
- wait 2 ticks
- open chest with {lobby.items.compass.rows} rows named "%{lobby.items.compass.guiName}%" to {_p}
- wait 2 ticks
- loop {lobby.minigames.list::*}:
- if "%{lobby.minigames.%loop-value%.slot}%" starts with "-":
- send "%{lobby.logo.Lobby}% &4[ERROR] %{lobby.arcatedColor.Lobby}%%{_p}% %{lobby.chatColor.Lobby}%has opened the compass with the following error:" and "%{lobby.arcatedColor.Lobby}%%{lobby.minigames.%loop-value%.slot}% %{lobby.chatColor.Lobby}%starts with '-'" to console
- else:
- if ("%{lobby.minigames.%loop-value%.slot}%" parsed as a number) is set:
- if ("%{lobby.minigames.%loop-value%.item}%" parsed as an item type) is set:
- set {_item} to {lobby.minigames.%loop-value%.item}
- else:
- set {_item} to paper
- set {_slot} to ("%{lobby.minigames.%loop-value%.slot}%" parsed as a number)
- if {lobby.minigames.%loop-value%.name} is set:
- if {lobby.minigames.%loop-value%.name} is not "&cNone":
- set {_name} to "%{lobby.minigames.%loop-value%.name}%"
- replace all "&" in {_name} with "§"
- if {lobby.mingames.%loop-value%.lore} is set:
- if {lobby.minigames.%loop-value%.lore} is not "&cNone":
- set {_lore} to "%{lobby.minigames.%loop-value%.lore}%"
- replace all "&" in {_lore} with "§"
- format slot {_slot} of {_p} with ("%{lobby.minigames.%loop-value%.item}%" parsed as an item) named "&f%{_name}%" with lore "%{_lore}%" without any NBT to close then run [teleportMinigame({_p}, loop-value)]
- else:
- format slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item named "&f%{_name}%" without any NBT to close then run [teleportMinigame({_p}, loop-value)]
- else:
- format slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item named "&f%{_name}%" without any NBT to close then run [teleportMinigame({_p}, loop-value)]
- else:
- format slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item without any NBT to close then run [teleportMinigame({_p}, loop-value)]
- else:
- format slot {_slot} of {_p} with "%{lobby.minigames.%loop-value%.item}%" parsed as an item without any NBT to close then run [teleportMinigame({_p}, loop-value)]
- else:
- send "%{lobby.logo.Lobby}% &4[ERROR] %{lobby.arcatedColor.Lobby}%%{_p}% %{lobby.chatColor.Lobby}%has opened the compass with the following error:" and "%{lobby.arcatedColor.Lobby}%%{lobby.minigames.%loop-value%.slot}% %{lobby.chatColor.Lobby}%is not a number" to console
- #-----------------------------------{ Player Interaction / Damage / Chat }-----------------------------------
- on damage:
- if victim is a player:
- if world of victim is {lobby.world}:
- if damage cause is ("void" parsed as a damage cause):
- set victim's health to 0
- else:
- cancel event
- else:
- if world of attacker is {lobby.world}:
- if {lobby.buildmode.%attacker%} is not set:
- cancel event
- on death:
- if world of player is {lobby.world}:
- set death message to ""
- on respawn:
- if world of player is {lobby.world}:
- set slot 4 of player to {lobby.items.compass}
- teleport player to {lobby.location}
- on inventory click:
- if world of player is {lobby.world}:
- if {lobby.buildmode.%player%} is not set:
- cancel event
- on click:
- if world of player is {lobby.world}:
- if player's held item is {lobby.items.compass}:
- cancel event
- openCompass(player)
- on drop:
- if world of player is {lobby.world}:
- if {lobby.buildmode.%player%} is not set:
- cancel event
- on break:
- if world is {lobby.world}:
- if {lobby.buildmode.%player%} is not set:
- cancel event
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You can't do this!"
- on place:
- if world of player is {lobby.world}:
- if {lobby.buildmode.%player%} is not set:
- cancel event
- on chat:
- if world of player is {lobby.world}:
- cancel event
- wait 1 tick
- if {lobby.chatEvent.%player%} is set:
- execute console command "/lobbycompass set %{lobby.chatEvent.%player%}% %player% %{lobby.chatEventMinigame.%player%}% %message%"
- else:
- set {_prefix} to "&8[%{lobby.arcatedColor.Server}%%player%&8]"
- send "%{_prefix}% &7➣ &f%message%" to all players in world of player
- send "&8[&eLOBBY&8]&8[%{lobby.arcatedColor.Server}%%player%&8] &7➣ &f%message%" to console
- on rightclick on trapdoor:
- if world of player is {lobby.world}:
- if {lobby.interaction.trapdoor} is false:
- cancel event
- on rightclick on door:
- if world of player is {lobby.world}:
- if {lobby.interaction.door} is false:
- if {lobby.buildmode.%player%} is not set:
- cancel event
- on rightclick on item frame:
- if world of player is {lobby.world}:
- if {lobby.interaction.item_frame} is false:
- if {lobby.buildmode.%player%} is not set:
- cancel event
- on rightclick on button:
- if world of player is {lobby.world}:
- if {lobby.interaction.button} is false:
- if {lobby.buildmode.%player%} is not set:
- cancel event
- on rightclick on armor stand:
- if world of player is {lobby.world}:
- if {lobby.interaction.armor_stand} is false:
- if {lobby.buildmode.%player%} is not set:
- cancel event
- on rightclick on furnace:
- if world of player is {lobby.world}:
- if {lobby.interaction.button} is false:
- if {lobby.buildmode.%player%} is not set:
- close player's inventory
- cancel event
- on rightclick on chest:
- if world of player is {lobby.world}:
- if {lobby.interaction.chest} is false:
- if {lobby.buildmode.%player%} is not set:
- close player's inventory
- cancel event
- on rightclick on trapped chest:
- if world of player is {lobby.world}:
- if {lobby.interaction.trapped_chest} is false:
- if {lobby.buildmode.%player%} is not set:
- close player's inventory
- cancel event
- on rightclick on crafting table:
- if world of player is {lobby.world}:
- if {lobby.interaction.crafting_table} is false:
- if {lobby.buildmode.%player%} is not set:
- close player's inventory
- cancel event
- #-----------------------------------{ Lobby Functions / Command }-----------------------------------
- function teleportLobby(p: Player, w: World):
- if {lobby.location} is set:
- if {_w} is {lobby.world}:
- teleport {_p} to {lobby.location}
- else:
- teleport {_p} to {lobby.location}
- send "World" to console
- wait 1 tick
- set {_message} to {lobby.joinMessage}
- replace "[player]" in {_message} with name of {_p}
- send "%{_message}%" to all players in world {lobby.world}
- send "&8[&eLOBBY&8]%{_message}%" to console
- clear {_p}'s inventory
- set slot 4 of {_p} to {lobby.items.compass}
- else:
- send "%{lobby.logo.Server}% %{lobby.chatColor.Server}%The %{lobby.arcatedColor.Server}%lobby %{lobby.chatColor.Server}%is %{lobby.chatColor.Server}%not set%{lobby.chatColor.Lobby}%!" to {_p}
- command /lobby [<text>] [<text>]:
- aliases: /hub
- trigger:
- if executor is player:
- if player has permission "lobby.*" or "lobby.set" or "lobby.buildmode":
- if arg-1 is set:
- if arg-1 is "help":
- send "&7──────────[ %{lobby.arcatedColor.Lobby}%lobby &7]──────────"
- send "<ttp:&7Get the help page><cmd:/lobby help>%{lobby.arcatedColor.Lobby}%/lobby help"
- if player has permission "op" or "lobby.*" or "rank.heler" or "lobby.set":
- send "<ttp:&7Set the lobby location><sgt:/lobby set>%{lobby.arcatedColor.Lobby}%/lobby set"
- if player has permission "op" or "lobby.*" or "rank.heler" or "lobby.buildmode":
- send "<ttp:&7Enable/Disable buildmode><sgt:/lobby buildmode enable/disable>%{lobby.arcatedColor.Lobby}%/lobby buildmode enable/disable"
- send "&7──────────[ %{lobby.arcatedColor.Lobby}%lobby &7]──────────"
- else if arg-1 is "set":
- if player has permission "lobby.*" or "lobby.set":
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the %{lobby.arcatedColor.Lobby}%%{cmd}% %{lobby.chatColor.Lobby}%to your location!"
- set {lobby.world} to "%world of player%"
- set {lobby.location} to location of player
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
- else if arg-1 is "buildmode":
- if player has permission "lobby.*" or "lobby.buildmode":
- if world of player is {lobby.world}:
- if arg-2 is set:
- if arg-2 parsed as a player is set:
- if {lobby.buildmode.%arg-2%} is true:
- delete {lobby.buildmode.%arg-2%}
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have %{lobby.arcatedColor.Lobby}%disabled %{lobby.chatColor.Lobby}%buildmode for %{lobby.arcatedColor.Lobby}%%name of arg-2 parsed as a player% %{lobby.chatColor.Lobby}%in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!"
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Your buildmode has been %{lobby.arcatedColor.Lobby}%disabled %{lobby.chatColor.Lobby}%in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!" to arg-2 parsed as a player
- else:
- set {lobby.buildmode.%arg-2%} to true
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have %{lobby.arcatedColor.Lobby}%enabled %{lobby.chatColor.Lobby}%buildmode for %{lobby.arcatedColor.Lobby}%%name of arg-2 parsed as a player% %{lobby.chatColor.Lobby}%in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!"
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Your buildmode has been %{lobby.arcatedColor.Lobby}%enabled %{lobby.chatColor.Lobby}%in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!" to arg-2 parsed as a player
- else:
- send "%{lobby.logo.Lobby}% %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%is not online!"
- else:
- if {lobby.buildmode.%player%} is true:
- delete {lobby.buildmode.%player%}
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have %{lobby.arcatedColor.Lobby}%disabled %{lobby.chatColor.Lobby}%buildmode for yourself in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!"
- else:
- set {lobby.buildmode.%player%} to true
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have %{lobby.arcatedColor.Lobby}%enabled %{lobby.chatColor.Lobby}%buildmode for yourself in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!"
- else:
- set {lobby.buildmode.%player%} to true
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have %{lobby.arcatedColor.Lobby}%enabled %{lobby.chatColor.Lobby}%buildmode for yourself in the %{lobby.arcatedColor.Lobby}%lobby%{lobby.chatColor.Lobby}%!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
- else:
- send "%{lobby.logo.server}% %{lobby.chatColor.Server}%You are %{lobby.arcatedColor.Server}%not %{lobby.chatColor.Server}%in the %{lobby.arcatedColor.Server}%lobby%{lobby.chatColor.Server}%!"
- else:
- teleportLobby(player, world of player)
- else:
- teleportLobby(player, world of player)
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Only players can execute this command!"
- command /lobbycompass [<text>] [<text>] [<text>] [<text>] [<text>]:
- aliases: /lcomp, /lcompass, /lobbycomp
- trigger:
- if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.create" or "lobby.compass.delete" or "lobby.compass.setspawn" or "lobby.compass.setslot" or "lobby.compass.setname" or "lobby.compass.deletename" or "lobby.compass.setlore" or "lobby.compass.deletelore" or "lobby.compass.setitem" or "lobby.compass.deleteitem" or "lobby.compass.list" or "lobby.compass.setrows" or "lobby.compass.gui":
- if arg-1 is not set:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Do %{lobby.arcatedColor.Lobby}%/%{cmd}% help %{lobby.chatColor.Lobby}%for more info."
- else if arg-1 is "help":
- send "&7──────────[ %{lobby.arcatedColor.Lobby}%LobbyCompass &7]──────────"
- send "<ttp:&7Get the help page><cmd:/lobbycompass help>%{lobby.arcatedColor.Lobby}%/lobbycompass help"
- if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.create":
- send "<ttp:&7Create a minigame><sgt:/lobbycompass create <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass create <minigame>"
- if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.delete":
- send "<ttp:&7Delete a minigame><sgt:/lobbycompass delete <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass delete <minigame>"
- if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.setslot":
- send "<ttp:&7Set the slot for a minigame><sgt:/lobbycompass setslot <minigame> <slot>>%{lobby.arcatedColor.Lobby}%/lobbycompass setslot <minigame> <slot>"
- if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.setname":
- send "<ttp:&7Set the name for a minigame><sgt:/lobbycompass setname <minigame> <name>>%{lobby.arcatedColor.Lobby}%/lobbycompass setname <minigame> <name>"
- if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.deletename":
- send "<ttp:&7Delete the name for a minigame><sgt:/lobbycompass deletename <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass deletename <minigame>"
- if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.setlore":
- send "<ttp:&7Set the lore for a minigame><sgt:/lobbycompass setlore <minigame> <lore>>%{lobby.arcatedColor.Lobby}%/lobbycompass setlore <minigame> <lore>"
- if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.deletelore":
- send "<ttp:&7Delete the lore for a minigame><sgt:/lobbycompass deletelore <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass deletelore <minigame>"
- if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.setitem":
- send "<ttp:&7Set the item for a minigame><sgt:/lobbycompass setitem <minigame> <item>>%{lobby.arcatedColor.Lobby}%/lobbycompass setitem <minigame> <item>"
- if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.deleteitem":
- send "<ttp:&7Delete the item for a minigame><sgt:/lobbycompass deleteitem <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass deleteitem <minigame>"
- if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.list":
- send "<ttp:&7Get a list from all minigames><sgt:/lobbycompass list>%{lobby.arcatedColor.Lobby}%/lobbycompass list"
- if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.setrows":
- send "<ttp:&7Set the amount of rows in the GUI><sgt:/lobbycompass setrows <rows>>%{lobby.arcatedColor.Lobby}%/lobbycompass setrows <rpws>"
- if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.setspawn":
- send "<ttp:&7Set the spawn for a minigame><sgt:/lobbycompass setspawn <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass setspawn <minigame>"
- if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.setspawntype":
- send "<ttp:&7Set the teleportion type><sgt:/lobbycompasss setspawntype <minigame> world/location>%{lobby.arcatedColor.Lobby}%/Lobbycompass setspawntype/sst <minigame> world/location"
- if player has permission "op" or "lobby.*" or "lobby.compass.*" or "lobby.compass.gui":
- send "<ttp:&7Open a easy-setup GUI for minigames><sgt:/lobbycompass gui <minigame>>%{lobby.arcatedColor.Lobby}%/lobbycompass gui <minigame>"
- send "&7──────────[ %{lobby.arcatedColor.Lobby}%LobbyCompass &7]──────────"
- else if arg-1 is "create":
- if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.create":
- if arg-2 is set:
- if {lobby.minigames.%arg-2%} is not set:
- set {lobby.minigames.%arg-2%} to true
- set {lobby.minigames.%arg-2%.name} to "&cNone"
- set {lobby.minigames.%arg-2%.lore} to "&cNone"
- set {lobby.minigames.%arg-2%.item} to "&cNone"
- set {lobby.minigames.%arg-2%.slot} to "&cNone"
- set {lobby.minigames.%arg-2%.teleportType} to "location"
- set {lobby.minigames.%arg-2%.spawn} to location of player
- add arg-2 to {lobby.minigames.list::*}
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully made the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%already exists!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1% <minigame>%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
- else if arg-1 is "delete" or "remove":
- if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.delete":
- if arg-2 is set:
- if {lobby.minigames.%arg-2%} is set:
- delete {lobby.minigames.%arg-2%}
- delete {lobby.mninigames.%arg-2%.name}
- delete {lobby.mninigames.%arg-2%.lore}
- delete {lobby.mninigames.%arg-2%.item}
- delete {lobby.mninigames.%arg-2%.slot}
- delete {lobby.mninigames.%arg-2%.spawn}
- delete {lobby.minigames.%arg-2%.teleportType}
- remove arg-2 from {lobby.minigames.list::*}
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully removed the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1% <minigame>%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
- else if arg-1 is "setspawn":
- if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setspawn":
- if arg-2 is set:
- if {lobby.minigames.%arg-2%} is set:
- set {lobby.minigames.%arg-2%.spawn} to location of player
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the spawn of the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%at %{lobby.arcatedColor.Lobby}%%location of player%%{lobby.chatColor.Lobby}%!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1% <minigame>%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
- else if arg-1 is "setslot":
- if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setslot":
- if arg-2 is set:
- if {lobby.minigames.%arg-2%} is set:
- if arg-3 is set:
- if (arg-3 parsed as a number) is set:
- if {lobby.items.compass.rows} is not set:
- set {lobby.items.compass.rows} to 1
- else if {lobby.items.compass.rows} < 1:
- set {lobby.items.compass.rows} to 1
- if {lobby.items.compass.rows}*9-1 <= arg-3 parsed as a number:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The amount %{lobby.arcatedColor.Lobby}%%arg-3% %{lobby.chatColor.Lobby}%is to big! The slot number has to be between %{lobby.arcatedColor.Lobby}%0 %{lobby.chatColor.Lobby}%and %{lobby.arcatedColor.Lobby}%%{lobby.items.compass.rows}*9-1%%{lobby.chatColor.Lobby}%."
- else:
- loop {lobby.minigames.list::*}:
- if {lobby.minigames.%loop-value%.slot} is arg-3:
- set {_set} to loop-value
- stop loop
- if {_set} is set:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The slot %{lobby.arcatedColor.Lobby}%%arg-3% %{lobby.chatColor.Lobby}%is already in use by the minigame %{lobby.arcatedColor.Lobby}%%{_set}%%{lobby.chatColor.Lobby}%!"
- else:
- set {lobby.minigames.%arg-2%.slot} to arg-3 parsed as a number
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the slot of the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%to %{lobby.arcatedColor.Lobby}%%arg-3%%{lobby.chatColor.Lobby}%!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.arcatedColor.Lobby}%%arg-3% %{lobby.chatColor.Lobby}%is not a number!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-2% <slot>%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% slot <minigame> <slot>%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
- else if arg-1 is "setname":
- if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setname":
- if arg-2 is set:
- if {lobby.minigames.%arg-2%} is set:
- if arg-3 is set:
- set {lobby.minigames.%arg-2%.name} to arg-3
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the name of the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%to %{lobby.arcatedColor.Lobby}%%arg-3%%{lobby.chatColor.Lobby}%!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setname %arg-2% <name>%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setname <minigame> <name>%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
- else if arg-1 is "deletename" or "delname":
- if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.deletename":
- if arg-2 is set:
- if {lobby.minigames.%arg-2%} is set:
- set {lobby.minigames.%arg-2%.name} to "&cNone"
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully deleted the name of the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1 in lower case% <minigame>%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
- else if arg-1 is "setlore":
- if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setlore":
- if arg-2 is set:
- if {lobby.minigames.%arg-2%} is set:
- if arg-3 is set:
- set {lobby.minigames.%arg-2%.lore} to arg-3
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the lore of the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%to %{lobby.arcatedColor.Lobby}%%arg-3%%{lobby.chatColor.Lobby}%!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Currect usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setlore %arg-2% <lore>%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.server}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
- else:
- send "%{lobby.logo.server}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setlore <minigame> <lore>%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
- else if arg-1 is "deletelore" or "dellore":
- if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.deletelore":
- if arg-2 is set:
- if {lobby.minigames.%arg-2%} is set:
- set {lobby.minigames.%arg-2%.lore} to "&cNone"
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully deleted the lore of the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1 in lower case% <minigame>%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
- else if arg-1 is "setitem":
- if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setitem":
- if arg-2 is set:
- if {lobby.minigames.%arg-2%} is set:
- if arg-3 is set:
- if arg-3 parsed as an item is set:
- set {lobby.minigames.%arg-2%.item} to arg-3 parsed as an item type
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the item of the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%to %{lobby.arcatedColor.Lobby}%%arg-3%%{lobby.chatColor.Lobby}%!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.arcatedColor.Lobby}%%arg-3% %{lobby.chatColor.Lobby}%is not an item!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setitem %arg-2% <item>%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setitem <minigame> <item>%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
- else if arg-1 is "deleteitem" or "delitem":
- if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.deleteitem":
- if arg-2 is set:
- if {lobby.minigames.%arg-2%} is set:
- set {lobby.minigames.%arg-2%.item} to "&cNone"
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully deleted the item of the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1 in lower case% <minigame>%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
- else if arg-1 is "list":
- if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.list":
- if {lobby.minigames.list::*} is not empty:
- loop {lobby.minigames.list::*}:
- if {_list} is set:
- set {_list} to "%{_list}%%{lobby.chatColor.Lobby}%, %{lobby.arcatedColor.Lobby}%%loop-value%"
- else:
- set {_list} to "%loop-value%"
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%This is the list of all the minigames:" and "%{lobby.arcatedColor.Lobby}%%{_list}%"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%There are no minigames added yet."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
- else if arg-1 is "setrows":
- if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setrows":
- if arg-2 is set:
- if arg-2 parsed as a number is set:
- if arg-2 parsed as a number < 7:
- set {lobby.items.compass.rows} to arg-2 parsed as a number
- set yml value "Lobby.Join.Compass.GUI.rows" of file "{@config}" to arg-2 parsed as a number
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the amount of rows to %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The maximum amount of rows is %{lobby.arcatedColor.Lobby}%6%{lobby.chatColor.Lobby}%!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%%{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%is not a number!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.server}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% setrows <rows>%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
- else if arg-1 is "setspawntype" or "sst":
- if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.setrows":
- if arg-2 is set:
- if {lobby.minigames.%arg-2%} is true:
- if arg-3 is set:
- if arg-3 is "world" or "location":
- set {lobby.minigames.%arg-2%.teleportType} to arg-3 in lower case
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the %{lobby.arcatedColor.Lobby}%spawn type %{lobby.chatColor.Lobby}%to %{lobby.arcatedColor.Lobby}%%arg-3 in lower case%%{lobby.chatColor.Lobby}%!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.arcatedColor.Lobby}%%arg-3% %{lobby.chatColor.Lobby}%is not a valid type!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.server}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1% %arg-2% world/location%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.server}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% %arg-1% <mingame> world/location%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
- else if arg-1 is "gui":
- if player has permission "lobby.*" or "lobby.compass.*" or "lobby.compass.gui":
- if arg-2 is set:
- if {lobby.minigames.%arg-2%} is set:
- wait 2 ticks
- open chest with 2 rows named "&8Config GUI" to player
- wait 2 ticks
- set {_item} to "book"
- set {_name} to {lobby.minigames.%arg-2%.name}
- set {_lore} to {lobby.minigames.%arg-2%.lore}
- replace all "&" in {_name} with "§"
- replace all "&" in {_lore} with "§"
- if ({lobby.minigames.%arg-2%.item} parsed as an item type) is set:
- if ({lobby.minigames.%arg-2%.item} parsed as an item type) is not air:
- set {_item} to {lobby.minigames.%arg-2%.item}
- format slot 2 of player with ({_item} parsed as an item type) named "%{lobby.chatColor.Lobby}%Minigame: %{lobby.arcatedColor.Lobby}%%arg-2%" to be unstealable
- format slot 3 of player with name tag named "%{lobby.chatColor.Lobby}%Name: %{lobby.arcatedColor.Lobby}%%{_name}%" to close then run [createCompassGUI(player, "&8Name %arg-2%", 3, 12, 14, green wool, red wool, "&aChange", "&cDeny", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Type the new name in the chat", "name", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have chosen to give the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%not an other name.", arg-2, false)]
- format slot 4 of player with paper named "%{lobby.chatColor.Lobby}%Lore" with lore {_lore} to close then run [createCompassGUI(player, "&8Lore %arg-2%", 3, 12, 14, green wool, red wool, "&aChange", "&cDeny", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Type the new lore in the chat", "lore", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have chosen to give the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%not an other lore.", arg-2, false)]
- format slot 5 of player with ({_item} parsed as an item type) named "%{lobby.chatColor.Lobby}%Item: %{lobby.arcatedColor.Lobby}%%{lobby.minigames.%arg-2%.item}%" to close then run [createCompassGUI(player, "&8Item %arg-2%", 3, 12, 14, green wool, red wool, "&aChange", "&cDeny", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Type the new item in the chat", "item", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have chosen to give the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%not an other item.", arg-2, false)]
- format slot 6 of player with clock named "%{lobby.chatColor.Lobby}%Slot: %{lobby.arcatedColor.Lobby}%%{lobby.minigames.%arg-2%.slot}%" to close then run [createCompassGUI(player, "&8Slot %arg-2%", 3, 12, 14, green wool, red wool, "&aChange", "&cDeny", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Type the new slot in the chat", "slot", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have chosen to give the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%not an other slot.", arg-2, false)]
- format slot 12 of player with redstone torch on named "%{lobby.chatColor.Lobby}%Spawn: %{lobby.arcatedColor.Lobby}%%{lobby.minigames.%arg-2%.spawn}%" to close then run [createCompassGUI(player, "&8Spawn %arg-2%", 3, 12, 14, green wool, red wool, "&aSet", "&cDeny", "/lobbycompass setspawn %arg-2%", "setspawn", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have chosen to give the minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%not an other spawn.", arg-2, true)]
- format slot 13 of player with barrier named "&cClose menu" to close
- if {lobby.minigames.%arg-2%.teleportType} is "location":
- format slot 14 of player with end portal frame named "%{lobby.ChatColor.Lobby}%Teleport: %{lobby.arcatedColor.Lobby}%Location" to close then run [execute console command "/lobbycompass set setspawntype %player% %arg-2% world"]
- else if {lobby.minigames.%arg-2%.teleportType} is "world":
- format slot 14 of player with end portal frame named "%{lobby.ChatColor.Lobby}%Teleport: %{lobby.arcatedColor.Lobby}%World" to close then run [execute console command "/lobbycompass set setspawntype %player% %arg-2% location"]
- else:
- format slot 14 of player with end portal frame named "%{lobby.ChatColor.Lobby}%Teleport: %{lobby.arcatedColor.Lobby}%Location" to close then run [execute console command "/lobbycompass set setspawntype %player% %arg-2% world"]
- #format slot 14 of player with end portal frame named "%{lobby.ChatColor.Lobby}%Teleport: %{lobby.arcatedColor.Lobby}%Location / World" to be unstealable
- format slot 17 of player with redstone named "&4Delete" to close then run [createCompassGUI(player, "&8Delete %arg-2%", 3, 12, 14, green wool, red wool, "&aDelete", "&cDeny", "/lcompass delete %arg-2%", "delete", "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You have chosen to not delete the minigame %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}%.", arg-2, true)]
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The minigame %{lobby.arcatedColor.Lobby}%%arg-2% %{lobby.chatColor.Lobby}%doesn't exist!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%The command is not used correctly!" and "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Correct usage: %{lobby.arcatedColor.Lobby}%/%{cmd}% gui <minigame>%{lobby.chatColor.Lobby}%."
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%You don't have enough permissions to do this!"
- else:
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Do %{lobby.arcatedColor.Lobby}%/%{cmd}% help %{lobby.chatColor.Lobby}%for more info."
- if executor is console:
- if arg-1 is "set":
- if arg-2 is set:
- if arg-3 is set:
- if arg-4 is set:
- if arg-5 is set:
- if arg-2 is "setspawntype":
- set {lobby.minigames.%arg-4%.teleportType} to arg-5 in lower case
- delete {lobby.chatEvent.%arg-3%}
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the %{lobby.arcatedColor.Lobby}%teleport type%{lobby.chatColor.Lobby}% to %{lobby.arcatedColor.Lobby}%%arg-5%%{lobby.chatColor.Lobby}%!" to arg-3 parsed as a player
- execute arg-3 parsed as a player command "/lobbycompass gui %arg-4%"
- delete {lobby.chatEventMinigame.%arg-2%}
- else if arg-2 is "item":
- if arg-5 parsed as an item type is set:
- set {lobby.minigames.%arg-4%.%arg-2%} to arg-5 parsed as an item type
- delete {lobby.chatEvent.%arg-3%}
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}% to %{lobby.arcatedColor.Lobby}%%arg-5%%{lobby.chatColor.Lobby}%!" to arg-3 parsed as a player
- execute arg-3 parsed as a player command "/lobbycompass gui %arg-4%"
- delete {lobby.chatEventMinigame.%arg-2%}
- else:
- send "%{lobby.logo.Lobby}% %{lobby.arcatedColor.Lobby}%%arg-5% %{lobby.chatColor.Lobby}%is not an item!" to arg-3 parsed as a player
- else if arg-2 is "slot":
- if arg-5 parsed as a number is set:
- set {lobby.minigames.%arg-4%.%arg-2%} to arg-5 parsed as a number
- delete {lobby.chatEvent.%arg-3%}
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}% to %{lobby.arcatedColor.Lobby}%%arg-5%%{lobby.chatColor.Lobby}%!" to arg-3 parsed as a player
- execute arg-3 parsed as a player command "/lobbycompass gui %arg-4%"
- delete {lobby.chatEventMinigame.%arg-2%}
- else:
- send "%{lobby.logo.Lobby}% %{lobby.arcatedColor.Lobby}%%arg-5% %{lobby.chatColor.Lobby}%is not a number!" to arg-3 parsed as a player
- else if arg-2 is "lore":
- set {_arg} to arg-5
- replace all "||" in {_arg} with "&r||"
- else:
- set {_arg} to arg-5
- if {_arg} is set:
- set {lobby.minigames.%arg-4%.%arg-2%} to {_arg}
- delete {lobby.chatEvent.%arg-3%}
- send "%{lobby.logo.Lobby}% %{lobby.chatColor.Lobby}%Succesfully set the %{lobby.arcatedColor.Lobby}%%arg-2%%{lobby.chatColor.Lobby}% to %{lobby.arcatedColor.Lobby}%%{_arg}%%{lobby.chatColor.Lobby}%!" to arg-3 parsed as a player
- execute arg-3 parsed as a player command "/lobbycompass gui %arg-4%"
- delete {lobby.chatEventMinigame.%arg-4%}
- else:
- send "&7[&eLOBBY&7] &cERROR &fThere is no %arg-2% given!"
- else:
- send "&7[&eLOBBY&7] &cERROR &fThere is no mingiame given!"
- else:
- send "&7[&eLOBBY&7] &cERROR &fThere is no player given!"
- else:
- send "&7[&eLOBBY&7] &cERROR &fThere is no setting to set given!"
- #-----------------------------------{ Other }-----------------------------------
- function sendPluginList(p: Player):
- set {_list::*} to list of plugins
- set {_count} to 0
- loop {_list::*}:
- add 1 to {_count}
- if {_list} is set:
- set {_list} to "%{_list}%%{lobby.chatColor.Server}%, %{lobby.arcatedColor.Server}%%loop-value%"
- else:
- set {_list} to "%{lobby.arcatedColor.Server}%%loop-value%"
- send "%{lobby.logo.server}% %{lobby.chatColor.Server}%Total Plugins: %{lobby.arcatedColor.Server}%%{_count}%%nl%%{lobby.chatColor.Server}%%{_list}%" to {_p}
- on command:
- command ends with "plugins":
- cancel event
- if player has permission "op":
- sendPluginList(player)
- command ends with "pl":
- cancel event
- if player has permission "op":
- sendPluginList(player)
- command is "spawn":
- if world of player is not "Zingdom-World" and "Zingdom1-Nether" and "Zingdom1-End":
- cancel event
- if world of player is {lobby.world}:
- teleport player to {lobby.location}
- command is "hub":
- teleport player to {lobby.location}
- else:
- set {cmd} to command in lower case
Add Comment
Please, Sign In to add comment