Added party alliances

Adds the following commands:
`/party alliance`
`/party alliance invite <target>`
`/party alliance accept`

Allies will share party chat and will not be able to harm eachother.
Item and XP sharing is limitied to a single party. Allowing two parties
to team up without sharing resources and XP.

Closes #1009
This commit is contained in:
TfT_02
2013-10-28 14:01:44 +01:00
parent e6e90954a9
commit c729297615
37 changed files with 607 additions and 40 deletions

View File

@ -174,4 +174,17 @@ public final class PartyAPI {
public static List<Player> getOnlineMembers(Player player) {
return PartyManager.getOnlineMembers(player);
}
public static boolean hasAlly(String partyName) {
return PartyManager.getParty(partyName).getAlly() != null;
}
public static String getAllyName(String partyName) {
Party ally = PartyManager.getParty(partyName).getAlly();
if (ally != null) {
return ally.getName();
}
return null;
}
}