Call ShopPurchaseEvent for buy type shops too.

Closes #111
This commit is contained in:
Kai committed 2017-05-17 17:14:31 +02:00
1 parent 078c6104d5
commit 60bc81d99c
1 file changed
+4
@@ -513,6 +513,10 @@ public class ShopManager {
p.sendMessage(MsgUtil.getMessage("negative-amount"));
return;
}
ShopPurchaseEvent e = new ShopPurchaseEvent(shop, p, amount);
Bukkit.getPluginManager().callEvent(e);
if (e.isCancelled())
return; // Cancelled
// Money handling
if (!p.getUniqueId().equals(shop.getOwner())) {
// Don't tax them if they're purchasing from