mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-30 14:03:21 +01:00
Fix Essentials' Eco problem
This commit is contained in:
parent
2c729789e8
commit
13d83ec92a
@ -40,6 +40,13 @@ public class NameManager {
|
||||
return lastSeenName.get(uuid);
|
||||
}
|
||||
|
||||
if (Bukkit.getOfflinePlayer(uuid).getName() != null) {
|
||||
String lastSeen = Bukkit.getOfflinePlayer(uuid).getName();
|
||||
|
||||
lastSeenName.put(uuid, lastSeen);
|
||||
return lastSeen;
|
||||
}
|
||||
|
||||
Account account = null;
|
||||
|
||||
try {
|
||||
@ -214,6 +221,10 @@ public class NameManager {
|
||||
public static boolean canUseName(Player player, String name) {
|
||||
String shortenedName = NameUtil.stripUsername(getUsername(player.getUniqueId()));
|
||||
|
||||
if (ChestShopSign.isAdminShop(name)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return shortenedName.equals(name) || Permission.otherName(player, name) || player.getUniqueId().equals(getUUID(name));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user