Skip to content

Commit

Permalink
getUUIDFor method did return null when shortened wasn't found because…
Browse files Browse the repository at this point in the history
… it was never checked if its their full name
  • Loading branch information
Feli499 committed Feb 22, 2024
1 parent 2a3e720 commit 1af279a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/main/java/com/Acrobot/ChestShop/UUIDs/NameManager.java
Expand Up @@ -44,14 +44,20 @@ public static UUID getUUIDForFullName(String name) {
return fullNamesToUUID.get(name.toLowerCase());
}

public static UUID getUUIDFor(String shortName) {
if (ChestShopSign.isAdminshopLine(shortName)) {
public static UUID getUUIDFor(String name) {
if (ChestShopSign.isAdminshopLine(name)) {
return adminShopUUID;
}
if (Properties.SERVER_ECONOMY_ACCOUNT != null && Properties.SERVER_ECONOMY_ACCOUNT.length() > 0 && Properties.SERVER_ECONOMY_ACCOUNT.equals(shortName)) {
if (Properties.SERVER_ECONOMY_ACCOUNT != null && Properties.SERVER_ECONOMY_ACCOUNT.length() > 0
&& Properties.SERVER_ECONOMY_ACCOUNT.equals(name)) {
return serverAccountUUID;
}
return usedShortNames.get(shortName.toLowerCase());

UUID uuid = usedShortNames.get(name.toLowerCase());
if (uuid != null)
return uuid;

return getUUIDForFullName(name);
}

public static String getFullNameFor(UUID playerId) {
Expand Down

0 comments on commit 1af279a

Please sign in to comment.