From 9de6b4724a1c975bfe29a51341864081aa17dde6 Mon Sep 17 00:00:00 2001 From: GJ Date: Thu, 7 Feb 2013 22:05:08 -0500 Subject: [PATCH] Changed names to refer to partyInvite for the sake of clarity. --- src/main/java/com/gmail/nossr50/datatypes/McMMOPlayer.java | 6 +++--- src/main/java/com/gmail/nossr50/party/PartyManager.java | 4 ++-- .../com/gmail/nossr50/party/commands/PartyCommand.java | 7 ++++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/datatypes/McMMOPlayer.java b/src/main/java/com/gmail/nossr50/datatypes/McMMOPlayer.java index e5291c60d..4b6bcdc52 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/McMMOPlayer.java +++ b/src/main/java/com/gmail/nossr50/datatypes/McMMOPlayer.java @@ -171,11 +171,11 @@ public class McMMOPlayer { // Party Stuff - public void setInvite(Party invite) { + public void setPartyInvite(Party invite) { this.invite = invite; } - public Party getInvite() { + public Party getPartyInvite() { return invite; } @@ -207,7 +207,7 @@ public class McMMOPlayer { party = null; } - public void removeInvite() { + public void removePartyInvite() { invite = null; } diff --git a/src/main/java/com/gmail/nossr50/party/PartyManager.java b/src/main/java/com/gmail/nossr50/party/PartyManager.java index 513eb5259..8a8a6cf51 100644 --- a/src/main/java/com/gmail/nossr50/party/PartyManager.java +++ b/src/main/java/com/gmail/nossr50/party/PartyManager.java @@ -339,14 +339,14 @@ public final class PartyManager { * @param mcMMOPlayer The player to add to the party */ public static void joinInvitedParty(Player player, McMMOPlayer mcMMOPlayer) { - Party invite = mcMMOPlayer.getInvite(); + Party invite = mcMMOPlayer.getPartyInvite(); if (!parties.contains(invite)) { parties.add(invite); } player.sendMessage(LocaleLoader.getString("Commands.Invite.Accepted", invite.getName())); - mcMMOPlayer.removeInvite(); + mcMMOPlayer.removePartyInvite(); addToParty(player.getName(), mcMMOPlayer, invite); } diff --git a/src/main/java/com/gmail/nossr50/party/commands/PartyCommand.java b/src/main/java/com/gmail/nossr50/party/commands/PartyCommand.java index c3e965c55..121638973 100644 --- a/src/main/java/com/gmail/nossr50/party/commands/PartyCommand.java +++ b/src/main/java/com/gmail/nossr50/party/commands/PartyCommand.java @@ -24,6 +24,7 @@ public class PartyCommand implements CommandExecutor { private Player player; private CommandExecutor partyJoinCommand = new PartyJoinCommand(); + private CommandExecutor partyAcceptCommand = new PartyAcceptCommand(); @Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { @@ -179,7 +180,7 @@ public class PartyCommand implements CommandExecutor { if (mcMMOPlayer.hasPartyInvite()) { if (mcMMOPlayer.inParty()) { Party party = mcMMOPlayer.getParty(); - McMMOPartyChangeEvent event = new McMMOPartyChangeEvent(player, party.getName(), mcMMOPlayer.getInvite().getName(), EventReason.CHANGED_PARTIES); + McMMOPartyChangeEvent event = new McMMOPartyChangeEvent(player, party.getName(), mcMMOPlayer.getPartyInvite().getName(), EventReason.CHANGED_PARTIES); mcMMO.p.getServer().getPluginManager().callEvent(event); @@ -190,7 +191,7 @@ public class PartyCommand implements CommandExecutor { PartyManager.removeFromParty(player.getName(), party); } else { - McMMOPartyChangeEvent event = new McMMOPartyChangeEvent(player, null, mcMMOPlayer.getInvite().getName(), EventReason.JOINED_PARTY); + McMMOPartyChangeEvent event = new McMMOPartyChangeEvent(player, null, mcMMOPlayer.getPartyInvite().getName(), EventReason.JOINED_PARTY); mcMMO.p.getServer().getPluginManager().callEvent(event); if (event.isCancelled()) { @@ -361,7 +362,7 @@ public class PartyCommand implements CommandExecutor { if (PartyManager.canInvite(player, mcMMOPlayer)) { Party party = mcMMOPlayer.getParty(); - Users.getPlayer(target).setInvite(party); + Users.getPlayer(target).setPartyInvite(party); player.sendMessage(LocaleLoader.getString("Commands.Invite.Success")); target.sendMessage(LocaleLoader.getString("Commands.Party.Invite.0", party.getName(), player.getName())); target.sendMessage(LocaleLoader.getString("Commands.Party.Invite.1"));