mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 03:34:43 +02:00
@ -15,6 +15,7 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
@ -65,11 +66,12 @@ public abstract class ExperienceCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
mcMMOPlayer = UserManager.getPlayer(args[0]);
|
||||
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayerExact(playerName);
|
||||
|
||||
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||
if (mcMMOPlayer == null) {
|
||||
profile = mcMMO.getDatabaseManager().loadPlayerProfile(args[0], false);
|
||||
profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false);
|
||||
|
||||
if (CommandUtils.unloadedProfile(sender, profile)) {
|
||||
return true;
|
||||
@ -84,7 +86,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
||||
editValues();
|
||||
}
|
||||
|
||||
handleSenderMessage(sender, args[0]);
|
||||
handleSenderMessage(sender, playerName);
|
||||
cleanUp();
|
||||
return true;
|
||||
|
||||
|
Reference in New Issue
Block a user