mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-01 16:19:53 +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