mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-01-10 00:57:34 +01:00
Fix the issue with name changes
This commit is contained in:
parent
ee9fcaba23
commit
8c77057703
@ -59,7 +59,7 @@ public class NameManager {
|
||||
|
||||
UUID uuid = account.getUuid();
|
||||
|
||||
if (uuid != null) {
|
||||
if (uuid != null && !usernameToUUID.containsValue(uuid)) {
|
||||
usernameToUUID.put(account.getName(), uuid);
|
||||
}
|
||||
|
||||
@ -184,7 +184,7 @@ public class NameManager {
|
||||
public static boolean canUseName(Player player, String name) {
|
||||
String shortenedName = NameUtil.stripUsername(getUsername(player.getUniqueId()));
|
||||
|
||||
return shortenedName.equals(name) || Permission.otherName(player, name);
|
||||
return shortenedName.equals(name) || Permission.otherName(player, name) || player.getUniqueId().equals(getUUID(name));
|
||||
}
|
||||
|
||||
public static boolean isAdminShop(UUID uuid) {
|
||||
|
Loading…
Reference in New Issue
Block a user