Team Games Proggraming

Ok so I have a few plugin games I've been thinking of that would be setup by teams( blue and a red team) But, Im a bit lost at the moment with my Proggraming for this and I'm looking for a few pointers. I would to have it setup where an Adimn does something like /start teambattle and then it allows people to be able to say like /join blue team ( or red team) Or if Adimn just does a command for them like /add (playername) red team. Looking for a few tips on how exactly how I would do this.

I think after reading this and this you might have a clue where to start. If you have questions on your code then you are very welcome to ask here again.
An idea i had instantly when reading your post was: try to get in contact with the developer of this plugin and ask him if you may use his work to point out who is in wich team. (i.e. tnt heads vs. dirt heads *lol* just an idea ) Maybe he even likes to help you with that.

I thinks it's not a problem to set up the teams. The "games" will be more difficult. What kind of games are you thinking of?
Anyway. If we should help you it would be great to know how familiar you are with java. Post #2 is for those who have never seen java before. Post #3 for those who programmed java a few hours already.

I think after reading this and this you might have a clue where to start. If you have questions on your code then you are very welcome to ask here again.
An idea i had instantly when reading your post was: try to get in contact with the developer of this plugin and ask him if you may use his work to point out who is in wich team. (i.e. tnt heads vs. dirt heads *lol* just an idea ) Maybe he even likes to help you with that.

Click to expand...

As long as the project is open-source I don't mined if you use code from my plugin.

Here is a copy of the core function in my BlockHead plugin.
It will place the item on the players head into there inventory or drop it on the ground if there is no room. Then it will put 1 item with the same ID as item stack onto there head and subtract 1 from the stack.