Use player objects instead of names - should be more efficient and less

buggy.
This commit is contained in:
GJ
2013-05-28 13:33:20 -04:00
parent b0eb4b93a8
commit 0ba4bc25c7
29 changed files with 57 additions and 46 deletions

View File

@@ -24,8 +24,8 @@ public class PartyInviteCommand implements CommandExecutor {
}
Player target = mcMMOTarget.getPlayer();
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName());
Player player = mcMMOPlayer.getPlayer();
Player player = (Player) sender;
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
if (player.equals(target)) {
sender.sendMessage(LocaleLoader.getString("Party.Invite.Self"));