From 2a89fb345b5fdf267e233c2ec4b721e6544f24d7 Mon Sep 17 00:00:00 2001 From: Andrzej Pomirski Date: Sun, 22 Jun 2014 14:33:02 +0200 Subject: [PATCH] NameManager > Bukkit --- .../Listeners/Economy/ServerAccountCorrector.java | 8 ++++---- .../Acrobot/ChestShop/Listeners/Economy/TaxModule.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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); }