Fix the "value already present" error

This commit is contained in:
Andrzej Pomirski 2014-07-22 22:03:50 +02:00
parent 50f90cb9ec
commit 6bbfc93b27
2 changed files with 3 additions and 2 deletions

View File

@ -30,7 +30,8 @@ public class ShopRefundListener implements Listener {
return;
}
UUID owner = NameManager.getUUID(event.getSign().getLine(NAME_LINE));
String ownerName = NameManager.getFullUsername(event.getSign().getLine(NAME_LINE));
UUID owner = NameManager.getUUID(ownerName);
CurrencyAddEvent currencyEvent = new CurrencyAddEvent(BigDecimal.valueOf(refundPrice), owner, event.getSign().getWorld());
ChestShop.callEvent(currencyEvent);

View File

@ -59,7 +59,7 @@ public class NameManager {
UUID uuid = account.getUuid();
if (uuid != null) {
usernameToUUID.put(username, uuid);
usernameToUUID.put(account.getName(), uuid);
}
return uuid;