Browse Source

You can't accept an alliance request when you already have an ally

TfT_02 11 years ago
parent
commit
b653aa57b7

+ 5 - 0
src/main/java/com/gmail/nossr50/commands/party/alliance/PartyAllianceAcceptCommand.java

@@ -23,6 +23,11 @@ public class PartyAllianceAcceptCommand implements CommandExecutor {
                     return true;
                 }
 
+                if (mcMMOPlayer.getParty().getAlly() != null) {
+                    player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.AlreadyAllies"));
+                    return true;
+                }
+
                 PartyManager.acceptAllianceInvite(mcMMOPlayer);
                 return true;
 

+ 1 - 1
src/main/resources/locale/locale_en_US.properties

@@ -523,7 +523,7 @@ Commands.Party.Alliance.Invite.0=[[RED]]ALERT: [[GREEN]]You have received a part
 Commands.Party.Alliance.Invite.1=[[YELLOW]]Type [[GREEN]]/party alliance accept[[YELLOW]] to accept the invite
 Commands.Party.Alliance.Invite.Accepted=[[GREEN]]Alliance invite Accepted.
 Commands.Party.Alliance.None=[[RED]]Your does not have an ally.
-Commands.Party.Alliance.AlreadyAllies=[[RED]]Your party already has an ally.
+Commands.Party.Alliance.AlreadyAllies=[[RED]]Your party already has an ally. Disband with [[DARK_AQUA]]/party alliance disband
 Commands.Party.Alliance.Help.0=[[RED]]This party hasn't formed an alliance. Invite a party leader
 Commands.Party.Alliance.Help.1=[[RED]] to an alliance with [[DARK_AQUA]]/party alliance invite <player>[[RED]].
 Commands.ptp.Enabled=Party teleporting [[GREEN]]enabled