mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 11:14:44 +02:00
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:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user