Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /queue <text>:
- trigger:
- if arg-1 is "join":
- if {queue::*} contains player:
- send "&cYou are already in the queue" # says this if the player is already in the queue
- else:
- add player to {queue::*}
- send "&eJoined the Queue" # joins the queue of the player is not part of it
- if size of {queue::*} is 2:
- teleport {queue::1} to {loc1} # teleports first element of queue to {loc1}
- delete {queue::1} # deletes the first element of the queue
- teleport {queue::1} to {loc2} # teleports the new first element of queue to {loc2}
- delete {queue::1} # deletes the new first element of the queue
- else if arg-1 is "leave":
- if {queue::*} contains player:
- remove player from {queue::*}
- send "&eLeft the Queue" #leaves the queue of the player is part of it
- else:
- send "&cYou are not in the queue" # says this if the player attempts to leave the queue but is not part of it
- else if arg-1 is "list":
- send "&cPlayers in queue: &f%{queue::*}%" # shows the list of players in the queue
- else if arg-1 is "clear":
- if player has permission "queue.clear":
- clear {queue::*} # clears the queue
- else if arg-1 is "setloc1":
- if player has permission "queue.setlocation":
- set {loc1} to player's location # sets the first location to where players of queue get teleported
- else if arg-1 is "setloc2":
- if player has permission "queue.setlocation":
- set {loc2} to player's location # sets the second location to where players of queue get teleported
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement