* Accept a party alliance invitation
*
* @param mcMMOPlayer The player who accepts the alliance invite
*/
public static void acceptAllianceInvite(McMMOPlayer mcMMOPlayer) {
Party invite = mcMMOPlayer.getPartyAllianceInvite();
Player player = mcMMOPlayer.getPlayer();
// Check if the party still exists, it might have been disbanded
if (!parties.contains(invite)) {
player.sendMessage(LocaleLoader.getString("Party.Disband"));
return;
}
if (!handlePartyChangeAllianceEvent(player, mcMMOPlayer.getParty().getName(), invite.getName(), McMMOPartyAllianceChangeEvent.EventReason.FORMED_ALLIANCE)) {
return;
}
player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Invite.Accepted", invite.getName()));
mcMMOPlayer.removePartyAllianceInvite();
createAlliance(mcMMOPlayer.getParty(), invite);
}