mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01:00
Fix getPlayer(...) for offline players having similar names
This commit is contained in:
parent
25ddaef423
commit
eaac3049af
@ -104,7 +104,11 @@ public abstract class EssentialsCommand implements IEssentialsCommand {
|
|||||||
try {
|
try {
|
||||||
exPlayer = server.getPlayer(UUID.fromString(searchTerm));
|
exPlayer = server.getPlayer(UUID.fromString(searchTerm));
|
||||||
} catch (IllegalArgumentException ex) {
|
} catch (IllegalArgumentException ex) {
|
||||||
exPlayer = server.getPlayer(searchTerm);
|
if (getOffline) {
|
||||||
|
exPlayer = server.getPlayerExact(searchTerm);
|
||||||
|
} else {
|
||||||
|
exPlayer = server.getPlayer(searchTerm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exPlayer != null) {
|
if (exPlayer != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user