diff --git a/src/main/java/com/Acrobot/ChestShop/Listeners/Economy/ServerAccountCorrector.java b/src/main/java/com/Acrobot/ChestShop/Listeners/Economy/ServerAccountCorrector.java index e73b240..666376f 100644 --- a/src/main/java/com/Acrobot/ChestShop/Listeners/Economy/ServerAccountCorrector.java +++ b/src/main/java/com/Acrobot/ChestShop/Listeners/Economy/ServerAccountCorrector.java @@ -30,7 +30,7 @@ public class ServerAccountCorrector implements Listener { event.setAdded(true); return; } else { - target = Bukkit.getOfflinePlayer(SERVER_ECONOMY_ACCOUNT).getUniqueId(); + target = NameManager.getUUID(SERVER_ECONOMY_ACCOUNT); } event.setAdded(true); @@ -51,7 +51,7 @@ public class ServerAccountCorrector implements Listener { event.setSubtracted(true); return; } else { - target = Bukkit.getOfflinePlayer(SERVER_ECONOMY_ACCOUNT).getUniqueId(); + target = NameManager.getUUID(SERVER_ECONOMY_ACCOUNT); } event.setSubtracted(true); @@ -72,7 +72,7 @@ public class ServerAccountCorrector implements Listener { event.hasEnough(true); return; } else { - target = Bukkit.getOfflinePlayer(SERVER_ECONOMY_ACCOUNT).getUniqueId(); + target = NameManager.getUUID(SERVER_ECONOMY_ACCOUNT); } CurrencyCheckEvent currencyCheckEvent = new CurrencyCheckEvent(event.getAmount(), target, event.getWorld()); @@ -105,7 +105,7 @@ public class ServerAccountCorrector implements Listener { event.setAmount(BigDecimal.valueOf(Double.MAX_VALUE)); return; } else { - target = Bukkit.getOfflinePlayer(SERVER_ECONOMY_ACCOUNT).getUniqueId(); + target = NameManager.getUUID(SERVER_ECONOMY_ACCOUNT); } CurrencyAmountEvent currencyAmountEvent = new CurrencyAmountEvent(target, event.getWorld()); diff --git a/src/main/java/com/Acrobot/ChestShop/Listeners/Economy/TaxModule.java b/src/main/java/com/Acrobot/ChestShop/Listeners/Economy/TaxModule.java index d3530be..b4cf409 100644 --- a/src/main/java/com/Acrobot/ChestShop/Listeners/Economy/TaxModule.java +++ b/src/main/java/com/Acrobot/ChestShop/Listeners/Economy/TaxModule.java @@ -47,7 +47,7 @@ public class TaxModule implements Listener { BigDecimal tax = getTax(event.getAmount(), taxAmount); if (!Economy.getServerAccountName().isEmpty()) { - CurrencyAddEvent currencyAddEvent = new CurrencyAddEvent(tax, Bukkit.getOfflinePlayer(Economy.getServerAccountName()).getUniqueId(), event.getWorld()); + CurrencyAddEvent currencyAddEvent = new CurrencyAddEvent(tax, NameManager.getUUID(Economy.getServerAccountName()), event.getWorld()); ChestShop.callEvent(currencyAddEvent); }