Fixed a NPE when trying to ptp to a non-existing player

This commit is contained in:
TfT_02 2013-03-21 23:09:44 +01:00
parent 70160468c0
commit 145a47c890
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ Version 1.4.04-dev
= Fixed bug where Shake wouldn't damage mobs whose max health was less than 4
= Fixed bug where the API would fail if the name of a player's current party is requested when the player isn't in one (Thanks @dualspiral!)
= Fixed bug with retrieving a player's party members
= Fixed bug which caused an NPE when trying to join a non-existing player
= Fixed bug which caused an NPE when trying to join the party of a non-existing player or when ptp to a non-existing player
! Updated localization files
- Removed deprecated functions from API classes.
- Removed functions for getting the PlayerProfile - using API classes is preferred, but if not the McMMOPlayer should be used instead

View File

@ -84,7 +84,7 @@ public class PtpCommand implements CommandExecutor {
protected static boolean canTeleport(CommandSender sender, Player player, String targetName) {
mcMMOTarget = UserManager.getPlayer(targetName);
if (CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
return false;
}