mirror of
https://github.com/AppleDash/SaneEconomy.git
synced 2024-09-29 15:07:43 +02:00
Make breaking sign shops work.
This commit is contained in:
parent
56a9fa8797
commit
4fc43a1f99
@ -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() {
|
||||
|
@ -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)));
|
||||
|
Loading…
Reference in New Issue
Block a user