mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-26 02:28:03 +01:00
Fixed NPE with /ptp <accept|toggle|acceptall>
This commit is contained in:
parent
0c027ca697
commit
9cf322ca0b
@ -32,6 +32,9 @@ public class PtpCommand implements CommandExecutor {
|
||||
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
player = (Player) sender;
|
||||
mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
if (args[0].equalsIgnoreCase("toggle")) {
|
||||
if (!Permissions.partyTeleportToggle(sender)) {
|
||||
sender.sendMessage(command.getPermissionMessage());
|
||||
@ -50,7 +53,6 @@ public class PtpCommand implements CommandExecutor {
|
||||
return acceptAnyTeleportRequest();
|
||||
}
|
||||
|
||||
player = (Player) sender;
|
||||
int ptpCooldown = Config.getInstance().getPTPCommandCooldown();
|
||||
long recentlyHurt = UserManager.getPlayer(player).getRecentlyHurt() * Misc.TIME_CONVERSION_FACTOR;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user