From b653aa57b795d3376693c5d1f782ea0d68629921 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sun, 9 Feb 2014 16:10:43 +0100 Subject: [PATCH] You can't accept an alliance request when you already have an ally --- .../commands/party/alliance/PartyAllianceAcceptCommand.java | 5 +++++ src/main/resources/locale/locale_en_US.properties | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/commands/party/alliance/PartyAllianceAcceptCommand.java b/src/main/java/com/gmail/nossr50/commands/party/alliance/PartyAllianceAcceptCommand.java index b5ffe0ae9..753440370 100644 --- a/src/main/java/com/gmail/nossr50/commands/party/alliance/PartyAllianceAcceptCommand.java +++ b/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; diff --git a/src/main/resources/locale/locale_en_US.properties b/src/main/resources/locale/locale_en_US.properties index 094e0a720..fd12f55ee 100644 --- a/src/main/resources/locale/locale_en_US.properties +++ b/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 [[RED]]. Commands.ptp.Enabled=Party teleporting [[GREEN]]enabled