mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Fixed a NPE when trying to ptp to a non-existing player
This commit is contained in:
parent
70160468c0
commit
145a47c890
@ -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 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 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 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
|
! Updated localization files
|
||||||
- Removed deprecated functions from API classes.
|
- 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
|
- Removed functions for getting the PlayerProfile - using API classes is preferred, but if not the McMMOPlayer should be used instead
|
||||||
|
@ -84,7 +84,7 @@ public class PtpCommand implements CommandExecutor {
|
|||||||
protected static boolean canTeleport(CommandSender sender, Player player, String targetName) {
|
protected static boolean canTeleport(CommandSender sender, Player player, String targetName) {
|
||||||
mcMMOTarget = UserManager.getPlayer(targetName);
|
mcMMOTarget = UserManager.getPlayer(targetName);
|
||||||
|
|
||||||
if (CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
if (!CommandUtils.checkPlayerExistence(sender, targetName, mcMMOTarget)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user