Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

Commit

Permalink
uuid resolution only forced if dash found in input
Browse files Browse the repository at this point in the history
  • Loading branch information
hb432 committed Jul 16, 2020
1 parent 16ce202 commit 720c3ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,16 @@ const _ = {
if (uuid === undefined && [ stored.toString(), offline.getName() ].includes(target)) uuid = stored;
});
if (uuid === undefined) {
try {
uuid = _.uuid(target);
} catch (error) {
uuid = server.getOfflinePlayer(target).getUniqueId();
if (target.includes('.')) {
return {};
} else if (target.includes('-')) {
try {
uuid = _.uuid(target);
} catch (error) {
uuid = server.getOfflinePlayer(target).getUniqueId();
}
} else {
return {};
}
}
}
Expand Down
Loading

0 comments on commit 720c3ad

Please sign in to comment.