Fix Essentials' Eco problem

This commit is contained in:
Andrzej Pomirski 2015-03-21 16:11:33 +01:00
parent 2c729789e8
commit 13d83ec92a

View File

@ -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));
}