Inviting yourself is bad.

This commit is contained in:
GJ 2013-02-12 15:08:07 -05:00
parent 574770c289
commit b21d5bdcc4
2 changed files with 6 additions and 0 deletions

View File

@ -46,6 +46,11 @@ public class PartyInviteCommand implements CommandExecutor {
mcMMOPlayer = Users.getPlayer((Player) sender); mcMMOPlayer = Users.getPlayer((Player) sender);
player = mcMMOPlayer.getPlayer(); player = mcMMOPlayer.getPlayer();
if (player.equals(target)) {
sender.sendMessage(LocaleLoader.getString("Party.Invite.Self"));
return true;
}
if (PartyManager.inSameParty(player, target)) { if (PartyManager.inSameParty(player, target)) {
sender.sendMessage(LocaleLoader.getString("Party.Player.InSameParty", target.getName())); sender.sendMessage(LocaleLoader.getString("Party.Player.InSameParty", target.getName()));
return true; return true;

View File

@ -520,6 +520,7 @@ Party.InformedOnJoin={0} [[GREEN]]has joined your party
Party.InformedOnQuit={0} [[GREEN]]has left your party Party.InformedOnQuit={0} [[GREEN]]has left your party
Party.InformedOnNameChange=[[GOLD]]{0} [[GREEN]]has set the party name to [[WHITE]]{1} Party.InformedOnNameChange=[[GOLD]]{0} [[GREEN]]has set the party name to [[WHITE]]{1}
Party.InvalidName=[[DARK_RED]]That is not a valid party name. Party.InvalidName=[[DARK_RED]]That is not a valid party name.
Party.Invite.Self=[[RED]]You can't invite yourself!
Party.IsLocked=[[RED]]This party is already locked! Party.IsLocked=[[RED]]This party is already locked!
Party.IsntLocked=[[RED]]This party is not locked! Party.IsntLocked=[[RED]]This party is not locked!
Party.Locked=[[RED]]Party is locked, only party leader may invite. Party.Locked=[[RED]]Party is locked, only party leader may invite.