Make breaking sign shops work.

This commit is contained in:
AppleDash 2016-10-23 13:56:10 -04:00
parent 56a9fa8797
commit 4fc43a1f99
2 changed files with 2 additions and 3 deletions

View File

@ -1,6 +1,7 @@
package org.appledash.saneeconomysignshop;
import org.appledash.saneeconomy.ISaneEconomy;
import org.appledash.saneeconomysignshop.listeners.BreakListener;
import org.appledash.saneeconomysignshop.listeners.InteractListener;
import org.appledash.saneeconomysignshop.listeners.SignChangeListener;
import org.appledash.saneeconomysignshop.signshop.SignShopManager;
@ -36,7 +37,7 @@ public class SaneEconomySignShop extends JavaPlugin {
signShopManager.loadSignShops();
getServer().getPluginManager().registerEvents(new SignChangeListener(this), this);
getServer().getPluginManager().registerEvents(new InteractListener(this), this);
getServer().getPluginManager().registerEvents(new SignChangeListener(this), this);
getServer().getPluginManager().registerEvents(new BreakListener(this), this);
}
public SignShopManager getSignShopManager() {

View File

@ -106,8 +106,6 @@ public class InteractListener implements Listener {
return;
}
System.out.printf("The amount is: %f\n", price);
player.getInventory().removeItem(new ItemStack(shop.getItem(), quantity)); // FIXME: This does not remove items with damage values that were detected by contains()
ecoMan.transact(new Transaction(Economable.PLUGIN, Economable.wrap(player), price, TransactionReason.PLUGIN_GIVE));
MessageUtils.sendMessage(player, String.format("You have sold %d %s for %s.", quantity, shop.getItem(), ecoMan.getCurrency().formatAmount(price)));