Fix getPlayer(...) for offline players having similar names

This commit is contained in:
AgentTroll 2019-03-09 18:50:55 -08:00
parent 25ddaef423
commit eaac3049af

View File

@ -104,7 +104,11 @@ public abstract class EssentialsCommand implements IEssentialsCommand {
try {
exPlayer = server.getPlayer(UUID.fromString(searchTerm));
} catch (IllegalArgumentException ex) {
exPlayer = server.getPlayer(searchTerm);
if (getOffline) {
exPlayer = server.getPlayerExact(searchTerm);
} else {
exPlayer = server.getPlayer(searchTerm);
}
}
if (exPlayer != null) {