mirror of
https://github.com/AppleDash/SaneEconomy.git
synced 2024-10-01 07:57:46 +02:00
Make breaking sign shops work.
This commit is contained in:
parent
56a9fa8797
commit
4fc43a1f99
@ -1,6 +1,7 @@
|
|||||||
package org.appledash.saneeconomysignshop;
|
package org.appledash.saneeconomysignshop;
|
||||||
|
|
||||||
import org.appledash.saneeconomy.ISaneEconomy;
|
import org.appledash.saneeconomy.ISaneEconomy;
|
||||||
|
import org.appledash.saneeconomysignshop.listeners.BreakListener;
|
||||||
import org.appledash.saneeconomysignshop.listeners.InteractListener;
|
import org.appledash.saneeconomysignshop.listeners.InteractListener;
|
||||||
import org.appledash.saneeconomysignshop.listeners.SignChangeListener;
|
import org.appledash.saneeconomysignshop.listeners.SignChangeListener;
|
||||||
import org.appledash.saneeconomysignshop.signshop.SignShopManager;
|
import org.appledash.saneeconomysignshop.signshop.SignShopManager;
|
||||||
@ -36,7 +37,7 @@ public class SaneEconomySignShop extends JavaPlugin {
|
|||||||
signShopManager.loadSignShops();
|
signShopManager.loadSignShops();
|
||||||
getServer().getPluginManager().registerEvents(new SignChangeListener(this), this);
|
getServer().getPluginManager().registerEvents(new SignChangeListener(this), this);
|
||||||
getServer().getPluginManager().registerEvents(new InteractListener(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() {
|
public SignShopManager getSignShopManager() {
|
||||||
|
@ -106,8 +106,6 @@ public class InteractListener implements Listener {
|
|||||||
return;
|
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()
|
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));
|
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)));
|
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