mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
parent
78109eb499
commit
3ae9956df9
@ -46,22 +46,25 @@ public class McrankCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(args[0]);
|
||||
String playerName = args[0];
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName);
|
||||
|
||||
if (mcMMOPlayer == null) {
|
||||
if (CommandUtils.inspectOffline(sender, new PlayerProfile(args[0], false), Permissions.mcrankOffline(sender))) {
|
||||
if (mcMMOPlayer != null) {
|
||||
playerName = mcMMOPlayer.getPlayer().getName();
|
||||
|
||||
if (CommandUtils.tooFar(sender, mcMMOPlayer.getPlayer(), Permissions.mcrankFar(sender))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (CommandUtils.tooFar(sender, mcMMOPlayer.getPlayer(), Permissions.mcrankFar(sender))) {
|
||||
|
||||
} else if (CommandUtils.inspectOffline(sender, new PlayerProfile(playerName, false), Permissions.mcrankOffline(sender))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Config.getInstance().getUseMySQL()) {
|
||||
sqlDisplay(sender, args[0]);
|
||||
sqlDisplay(sender, playerName);
|
||||
}
|
||||
else {
|
||||
flatfileDisplay(sender, args[0]);
|
||||
flatfileDisplay(sender, playerName);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user