From 339d760cee3cbd55f50fe697d332e776020a57ca Mon Sep 17 00:00:00 2001 From: Hassan Syyid Date: Sat, 2 Jan 2016 10:30:29 -0500 Subject: [PATCH] Update to use EconomyService --- build.gradle | 3 +- libs/TotalEconomy.jar | Bin 24791 -> 0 bytes .../io/github/hsyyid/adminshop/AdminShop.java | 63 ++++++++++++------ 3 files changed, 43 insertions(+), 23 deletions(-) delete mode 100644 libs/TotalEconomy.jar diff --git a/build.gradle b/build.gradle index 6d1b9eb..dbf6e02 100644 --- a/build.gradle +++ b/build.gradle @@ -23,8 +23,7 @@ repositories { } dependencies { - compile "org.spongepowered:spongeapi:2.1-SNAPSHOT" - compile files('libs/TotalEconomy.jar') + compile "org.spongepowered:spongeapi:3.0.0" } test { diff --git a/libs/TotalEconomy.jar b/libs/TotalEconomy.jar deleted file mode 100644 index 5ddf971b45181afc7ae1fa55de4cb65db798f33c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24791 zcmaI6V{~N!w=9~D?H$|Mv7K~m+qP|cM;+U?ZQEAI?sVL7`t^DD{&@Gk^PTm3&NbE; zYs{)yRZ~e80umk!3>FN`&qqoU?EmvXfP}deVp-W(Sr+_F z9jBI(TBKNb=$i zFJ0Mt1`!w@Ed3TDbn&C@^JuZ#-;v**TGz6;JkfDM#0Bp z64{PUlf|Bzi$63Z3SVy8#a6*-#ck%t%~&-H1wpH9XI*tglRw+{B*^JSu4iZ1l~3LyvZ?`GT=frfp14+jiU)Gv! zcW`gsjrA^AWznVjREVmrW9jL-ttB|f-x;Cbn68ajHQT7|%2TS-W~DDq;=_|!d$pDO zP_;IN927EIyqMGYtkQiZI!w|4;Y_(jE*7eU+b5|hrJ|Qj(rKaOM@#UncM$cqS-Wx} ze*4Poa7BHVa65fo#Y-_$7T~^h>pkGI55d*~E-N(=&S+%=2^=3`lM`Ylmn_?mD!t_l z+DLZmcN`xn?_J=Y+rXr>c~ENYWi)Twp(XFuLfyd`Z$Pl&S#{q3!}{ga2au z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leportHelper helper; public static ArrayList adminShops = new ArrayList(); public static ArrayList buyAdminShops = new ArrayList(); public static ArrayList adminShopModifiers = new ArrayList(); @@ -76,8 +77,19 @@ public void onServerInit(GameInitializationEvent event) { getLogger().info("AdminShop loading.."); + Optional optionalEconomyService = game.getServiceManager().provide(EconomyService.class); + + if(!optionalEconomyService.isPresent()) + { + getLogger().error("There is no Economy Plugin installed on this Server! This plugin will not work correctly!"); + return; + } + else + { + economyService = optionalEconomyService.get(); + } + game = Sponge.getGame(); - helper = game.getTeleportHelper(); try { @@ -106,7 +118,7 @@ public void onServerInit(GameInitializationEvent event) .build(); game.getCommandManager().register(this, setItemShopCommandSpec, "setitem"); - + getLogger().info("-----------------------------"); getLogger().info("AdminShop was made by HassanS6000!"); getLogger().info("Please post all errors on the Sponge Thread or on GitHub!"); @@ -299,13 +311,18 @@ public void onPlayerInteractBlock(InteractBlockEvent event) double price = thisShop.getPrice(); String itemName = thisShop.getItemName(); - TotalEconomy totalEconomy = (TotalEconomy) game.getPluginManager().getPlugin("TotalEconomy").get().getInstance().get(); - AccountManager accountManager = totalEconomy.getAccountManager(); BigDecimal amount = new BigDecimal(price); - - if (accountManager.getBalance(player.getUniqueId()).compareTo(amount) >= 0) + + if(!economyService.getAccount(player.getUniqueId()).isPresent()) { - accountManager.removeFromBalance(player.getUniqueId(), amount); + economyService.createAccount(player.getUniqueId()); + } + + UniqueAccount playerAccount = economyService.getAccount(player.getUniqueId()).get(); + + if (playerAccount.getBalance(economyService.getDefaultCurrency()).compareTo(amount) >= 0) + { + playerAccount.withdraw(economyService.getDefaultCurrency(), amount, Cause.of(this)); player.sendMessage(Text.of(TextColors.DARK_RED, "[AdminShop]: ", TextColors.GOLD, "You have just bought " + itemAmount + " " + itemName + " for " + price + " dollars.")); if (thisShop.getMeta() != -1) @@ -361,8 +378,12 @@ public void onPlayerInteractBlock(InteractBlockEvent event) double price = thisBuyShop.getPrice(); String itemName = thisBuyShop.getItemName(); - TotalEconomy totalEconomy = (TotalEconomy) game.getPluginManager().getPlugin("TotalEconomy").get().getInstance().get(); - AccountManager accountManager = totalEconomy.getAccountManager(); + if(!economyService.getAccount(player.getUniqueId()).isPresent()) + { + economyService.createAccount(player.getUniqueId()); + } + + UniqueAccount playerAccount = economyService.getAccount(player.getUniqueId()).get(); BigDecimal amount = new BigDecimal(price); int quantityInHand = 0; @@ -370,20 +391,20 @@ public void onPlayerInteractBlock(InteractBlockEvent event) { int meta = thisBuyShop.getMeta(); - if (player.getItemInHand().isPresent() && player.getItemInHand().get().getItem().getName().equals(itemName) && player.getItemInHand().get().getQuantity() == itemAmount && player.getItemInHand().get().toContainer().get(new DataQuery("UnsafeDamage")).isPresent() && (Integer) player.getItemInHand().get().toContainer().get(new DataQuery("UnsafeDamage")).get() == meta) + if (player.getItemInHand().isPresent() && player.getItemInHand().get().getItem().getName().equals(itemName) && player.getItemInHand().get().getQuantity() == itemAmount && player.getItemInHand().get().toContainer().get(DataQuery.of("UnsafeDamage")).isPresent() && (Integer) player.getItemInHand().get().toContainer().get(DataQuery.of("UnsafeDamage")).get() == meta) { player.setItemInHand(null); - accountManager.addToBalance(player.getUniqueId(), amount, true); + playerAccount.deposit(economyService.getDefaultCurrency(), amount, Cause.of(this)); player.sendMessage(Text.of(TextColors.DARK_RED, "[AdminShop]: ", TextColors.GOLD, "You have just sold " + itemAmount + " " + itemName + " for " + price + " dollars.")); } - else if (player.getItemInHand().isPresent() && player.getItemInHand().get().getItem().getName().equals(itemName) && player.getItemInHand().get().getQuantity() > itemAmount && player.getItemInHand().get().toContainer().get(new DataQuery("UnsafeDamage")).isPresent() && (Integer) player.getItemInHand().get().toContainer().get(new DataQuery("UnsafeDamage")).get() == meta) + else if (player.getItemInHand().isPresent() && player.getItemInHand().get().getItem().getName().equals(itemName) && player.getItemInHand().get().getQuantity() > itemAmount && player.getItemInHand().get().toContainer().get(DataQuery.of("UnsafeDamage")).isPresent() && (Integer) player.getItemInHand().get().toContainer().get(DataQuery.of("UnsafeDamage")).get() == meta) { quantityInHand = player.getItemInHand().get().getQuantity() - itemAmount; player.setItemInHand(game.getRegistry().createBuilder(ItemStack.Builder.class) .fromItemStack(player.getItemInHand().get()) .quantity(quantityInHand) .build()); - accountManager.addToBalance(player.getUniqueId(), amount, true); + playerAccount.deposit(economyService.getDefaultCurrency(), amount, Cause.of(this)); player.sendMessage(Text.of(TextColors.DARK_RED, "[AdminShop]: ", TextColors.GOLD, "You have just sold " + itemAmount + " " + itemName + " for " + price + " dollars.")); } else @@ -396,7 +417,7 @@ else if (player.getItemInHand().isPresent() && player.getItemInHand().get().getI if (player.getItemInHand().isPresent() && player.getItemInHand().get().getItem().getName().equals(itemName) && player.getItemInHand().get().getQuantity() == itemAmount) { player.setItemInHand(null); - accountManager.addToBalance(player.getUniqueId(), amount, true); + playerAccount.deposit(economyService.getDefaultCurrency(), amount, Cause.of(this)); player.sendMessage(Text.of(TextColors.DARK_RED, "[AdminShop]: ", TextColors.GOLD, "You have just sold " + itemAmount + " " + itemName + " for " + price + " dollars.")); } else if (player.getItemInHand().isPresent() && player.getItemInHand().get().getItem().getName().equals(itemName) && player.getItemInHand().get().getQuantity() > itemAmount) @@ -404,7 +425,7 @@ else if (player.getItemInHand().isPresent() && player.getItemInHand().get().getI quantityInHand = player.getItemInHand().get().getQuantity() - itemAmount; player.setItemInHand(null); game.getCommandManager().process(game.getServer().getConsole(), "minecraft:give" + " " + player.getName() + " " + itemName + " " + quantityInHand); - accountManager.addToBalance(player.getUniqueId(), amount, true); + playerAccount.deposit(economyService.getDefaultCurrency(), amount, Cause.of(this)); player.sendMessage(Text.of(TextColors.DARK_RED, "[AdminShop]: ", TextColors.GOLD, "You have just sold " + itemAmount + " " + itemName + " for " + price + " dollars.")); } else