Forum / Workshop / War Teams Plugin for Minecraft

War Teams Plugin for Minecraft

A thread for me to keep track of things if I work on this plugin for our future server.

Description: This plugin would allow players to create a team with the name of their choice and invite players to it. By default players in teams would have a gray name (instead of white), and ideally this would show in both chat and overhead. A teams color would also be able to be edited by an admin (via editing a text file on the server is fine), so that the owners of the server can give teams that become big and powerful their own color (red,blue,green,etc). Each team will also have a total of 4 available ranks with simple permissions listed below. Lastly, the team leader is able to "claim land" for his team via command. The size of this claim would grow depending on how many members are in the team . (Members x 25)(Max size 300x300) (This means if there is 3 members the claim size is 75x75, if it is 20, then it is the max size of 300x300) if one team's claim size grows and begins to overlap another team's claim, the claim that was there first will supersede the new one by not allowing the other to grow further. A claim is a specially protected area. What this means is that when there is less than 20%(maybe this percent could be set as a setting by an admin) of a team's members online, the team's claim may not be modified by anyone who is not in the team. If there are 20% or more team players online, than a land may be griefed/built on/destroyed by any player (it is the online team's job to defend its claim). Ideally a leader can move it's team claim once a week. I will explain more below.

-Each team has a total of 4 possible ranks, these ranks can be renamed.

Rank 1: "Leader", build/destroy on team land when less than 30%
Commands: /tInvite, /tKick, /tClaim, /tRankName, /tPromote, /tInfo
Rank 2: "Captain", build/destroy on team land
Commands: /tInvite, /tKick, /tInfo
Rank 3: "Soldier", build/destroy on team land
Commands: /tInfo
Rank 3: "Recruit", no abilities but part of the team.
Commands: /tInfo

Commands:

/tCreate :Creates team with team name, must not be in a team.
/tInvite :Invites a player to a team, invitee must not be in team.
/tAccept :Accepts most recent team invite, must not be in a team. (Should update a team's claim size)
/tLeave : Player leaves a team. (Should update a team's claim size)
/tKick : Kicks a player from the team. (Should update a team's claim size)
/tClaim : Claims a land for a team, origin at the current coordinate. Can only be used once a week, each time it is used it first removes the old claim land from protection then applies the new area.
/tRankName : Changes the name of a rank, defaults above.
/tPromote : Promotes a player to a new rank, can also demote.
/tInfo : Gives info on the team such as Team Name, Players listed by rank, claim size(but not location).

[TEAMID][TEAMNAME][TEAMCOLOR][ClaimCoords][RANk1LIST][RANK2LIST][RANK3LIST][RANK4LIST][RANK1NAME][Rank2NAME][Rank3Name][Rank4Name]

0:WarClan:20,10:#100000:SatrosWaR:Wickwire,Jedikilla1,The_Finisher,Pheloz,Cezul,CJ_Guns:Squid_Rofel,G-Bombz:NiggaMike:War Clan Leader:War Clan Member:War Legionaire:War Recruit:

got the constructor working, takes a line of team info from a text file at start up heres a sample output function for people to use with /tInfo

Team Name: WarClan
Team ID: 0
Claim Location: X:20 Z:10
Members Online: 0 / 10
Rank 1 - War Clan Leader
SatrosWaR
Rank 2 - War Clan Member
Wickwire Jedikilla1 The_Finisher Pheloz Cezul CJ_Guns
Rank 3 - War Legionaire
Squid_Rofel G-Bombz
Rank 4 - War Recruit
NiggaMike

Generated via code.

The program will generally work in 3 parts, although im uncertain about the playerinfo part for now

The Main Plugin, Team, TeamPlayer.

The Main Plugin will load all the info at start up, it will read in each line of teams.txt and teamplayers.txt and construct an ArrayList of teams, team players, and protected areas.

The Main Plugin will also handle the following:
1.  When a player enters a command
2. Saving the teams and teamplayers to their text files every now an then
3. determining whether a player can destroy land in a area or now
4. When players join or leave, it will increment/decrement the numbers of online players for that team

Teams will handle:
contructing of team class via string line
modifying the text file via public commands given to it by the Main Plugin

TeamPlayer will handle: // Might not use this and just add into the players.txt that is already there.
easy access for color, teamID, and teamRank