Need help thinking of a way to pull this off

Discussion in 'Plugin Development' started by skipperguy12, May 18, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    skipperguy12

    I suck at thinking, get ready for a dumb question:

    So, my friend wants me to code a spleef plugin, and i'm being paid. So I decided to start working on it, it has been surprisingly easy until just now.

    So, I need a way to handle multiple matches with signs, so I created a match class which can handle the map, the current players, and all that. Now, I need to be able to run multiple matches which cycle through maps, so I asked one of my friends to help me with a fileioutil, which is done and can copy worlds to temporary directories. But now, i've come to the point where I need to handle the whole thing with signs and people can join a queue and things like that, but the problem is, should I kill the match first, or should I recycle the match. How am I going to handle multiple queues?

    If anyone wants to see the code:
    https://github.com/skipperguy12/Spleef
     
  2. Offline

    GodzOfMadness

    skipperguy12
    [OFF TOPIC]
    Is the payment cookies?
    [ON TOPIC]
    For your question, You should just reset all the variables and clear all the lists you have storing the player's in the current game. For queues you could just see if the game has started. Then if it has started, you would add them to the queue list. Then check when the game ends and start clearing the lists and resetting the variables you would just keep the queue list saved and you then would teleport the player's in the queue list to the points in the game and then clear the queue list. For multiple queues, just create another instance of say the Game class. Then loop through an ArrayList through the games like ArrayList<Game> games = new ArrayList<Games>(); For the signs you could just add them on a wall and listen to the interact event. If it has the certain text on the sign(like checking if it's the right game id or something, some way to differ which game their in) and go off from their.
     
Thread Status:
Not open for further replies.

Share This Page