AutoQueue
This plugin was created based on a request on the Bukkit Forums.
What is it?
If you have attractions or areas on your server, and want to restrict access to them with timed delays, this plugin is for you! AutoQueue allows you to define queues using a simple and efficient system, and uses signs to let users join them. No dependencies are necessary, and only one permission node exists.
It is important to note, however, that the AutoQueue will only work for the version it's built for—in other words, if you download a version of AutoQueue built for 1.10 and try to run it with a 1.8 server, please don't complain when you get errors.
Permissions
autoqueue.admin - Users with this permission can create, modify, or remove queues, using the commands described below under "Advanced".
Commands
The hub command for AutoQueue is /autoqueue, with aliases under /attraction, /autoq, and /aqueue. Typing /autoqueue into chat will list available commands.
Basic Commands
These commands let users leave/exit a queue. The arguments are pretty self-explanatory.../autoqueue <exit|list> - Does what it says on the tin.
Advanced Commands
These commands are responsible for managing and creating queues. They require the autoqueue.admin permission node. In all cases, the argument <name> is case-sensitive and can consist of multiple words.
/autoqueue <name> create - Creates an AutoQueue named <name>.
/autoqueue <name> edit - Opens the edit GUI for a queue. Also accessible by right-clicking on a queue sign.
/autoqueue <player> kick - Kicks a player from a queue.
/autoqueue <name> remove - Removes any AutoQueues with the name <name>.
/autoqueue <name> start - Starts the clock for the AutoQueue named <name>.
/autoqueue <name> halt - Stops and resets the clock for the AutoQueue named <name>. Also removes all members!
Example Use
Make sure that you have the autoqueue.admin permission node or that you are opped - or else these commands will not work for you.
1. Choose a name for your queue, and register it.I'll be using a sample name of "Icefall" for my queue. It's usually good practice to make your queue names 16 characters or less, because they'll have to fit on a sign later.
Once I've chosen my name, I'll register a queue for it with the create command - /autoqueue Icefall create.
2. Set a location for your queue.
Maybe my attraction, Icefall, isn't exactly the most fun - it just involves teleporting the player to the edge of the cliff and then dropping him into a pool of icey water. Whatever - I'm a plugin developer, not Disney. To set the location, I simply type /autoqueue Icefall edit. This opens up a GUI that looks something like this:
After this, I just click on the button for "Set Location" and punch the block that I want the players to be teleported to.
3. Add additional details.
Now, I add the finishing touches to my AutoQueue by defining things like countdown or queue size. The buttons to set these values can be found in the GUI, but just as an example, if I want my players to wait 15 seconds before they get plunged into the Icey Pool of Fun, I just retype /autoqueue Icefall edit, open the GUI, and click on the button for queue size.
4. It's a sign!
How do you let players join the queue for your attraction? For now, no command exists - instead, players use signs to join AutoQueues. So, what's the format for one of these signs? Well:
Make sure that your first line is "[AutoQueue]", and that the second is the name of your attraction - exactly as you entered it the first time. Once you do this, the sign will replaced with something looking like this:
Players can now join your queue and do the most exciting thing of all: wait in line. You're done!
Questions? Comments? Concerns? Post a comment or use the ticket tracker!
For a complete changelog, click here.
@htmlman1:
there is a better version of this plugin on here
server ip: mcamusement.com
can you make it like theres , theres does not skip numbers and it also has a set limit for how many players to tp at one time also it removes the player from the queue when they get teleported out
@htmlman1
What I mean is, when the player gets sent to the queue location and the command is executed it does not remove the player from the queue.
EDIT: Also, the queue countdown does not stop when a player leaves the queue, could you make this an option in the config? I was also wondering you could make it so in the config, people can re-arrange the sign, for example change the prefix it &c[AutoQueue] or &9[Queue], and then have a list of variables they can use on like 2, 3, and 4? I was also wondering if you could make it so the players can customize the messages, and make a action bar message that they can customize with placeholders like "You are #(Player in queue) in the queue for (queue) | Wait Time: (Time Left)" Variable for Player in queue could be %Player_IQ%, Variable for Queue could be %Queue_Name$, and Variable for Wait time could be %time_left%. Is there anyway that you could make a [Wait Times] sign, this would be at the entrance to the ride/meet and greet, and this would have the time that is has on the queue sign, +10 seconds, due to them having to walk through the queue, I would like the sign format to be: &9[Wait Times] &3Click for the &3Wait Times of &d(Queue Name) then when the player clicks the sign, it would send the player "&aThe approximate Wait Time for &d(Queue Name) &ais &b(Time)" This would also be very cool if configurable in the config, like the rest of the messages and signs would be cool to have. I was wondering if you could make it so in the config there was a section to pick a particle that was released on the sign when a player clicked any queue or wait times sign? Finally,I was wondering if you could make it so a staff member could do /attraction close/open/maintenance (Queue Name) to make it so the queue was closed and when a player clicked the sign it said "The attraction is closed/undergoing maintenance!" it would also change the sign to [AutoQueue] (Queue Name) &c&lClosed / &c&lMaintenace Then it would go back to default when opened, thanks for taking all these suggestions!
oh what mickey meant is that when you get sent to the queue location it does not remove you from the queue
could you do this in the next update:
can you make it so when a person gets teleported from the queue it will remove him from the queue and also can you make it so I can set a amount of players a queue can teleport at 1 time
also setcommand does not "work" by work i mean it does not do anything when the time ends
@MickeyIsBae
I'm sorry for disregarding this comment; for whatever reason I didn't see it earlier. Could you elaborate more on "the queue seems to not remove the player from the queue whenever they are teleported in"? I can't seem to replicate any bug similar to this, and I'm not entirely sure what you mean.
I'll start adding the ability for staff members to kick players in the meantime.
@htmlman1
The queue seems to not remove the player from the queue whenever they are teleported in, I also think it would be nice if a staff member could remove players from the queue by player, not just everyone in the queue. Please take these into account when making updates!
@mikeyjohn03
I've got this and the two bugs you mentioned in mind. The skipping of numbers that happens with the countdown can happen because of lag, and isn't something I can do anything about.
Locking/unlocking is in progress.
@Creepergz
I like this idea! I can add a configuration value that switches the sign's mechanics between this mechanic and the one I've coded already.
Hello, one suggestion that I would like to make is. If two people are in the queue (or more), the first person that clicked the queue sign should be teleported in first. Then have the second person who clicked the queue sign get teleported in once the countdown gets to zero again and so on.
Theres two bugs we found one is the countdown will sometimes skip numbers and two it wil stop counting down.
We really need the lock/unlock feature. This plugin helps our server so much!
Can you add a way were you can lock and unlock queues. Also can you make it so the queue only teleports a set amount of players.
Okay I think I can fix the version problem.
@mikeyjohn03
Are you sure you updated your server to Java 8? Seems like the same error to me.
Theres a new error now: http://pastebin.com/f6Bwfdpu
@mikeyjohn03
Are you getting the same error, or something different?
@htmlman1
Still not working my server runs off of mcprohosting.
Can you still add it so the queue can activate redstone this would help people with train carts alot.
@mikeyjohn03
Ah, that's not an issue with the coding of my plugin. It means that the version of Java that you're using isn't the latest - this plugin requires Java 8 and above to work. Try upgrading your version of Java and then try again.
Never mind I found something check it out here: http://pastebin.com/ENjGtZaC