mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Don't calculate price and etc for stack shop, restore back normal shop logic because it now should process like normal shop like before
Former-commit-id: 6cb590109ac25fa980a95d9650c2f122e80fe74e
This commit is contained in:
1 parent
794814bf2f
commit
1cd3545ac0
1 file changed
+9
-6
@@ -788,11 +788,9 @@ public class ShopManager {
|
||||
// }
|
||||
// }
|
||||
|
||||
if (plugin.getConfig().getBoolean("shop.allow-stacks") && info.getItem().getAmount() > 1) {//FIXME: need a better impl
|
||||
price = CalculateUtil.divide(price,info.getItem().getAmount());
|
||||
}
|
||||
|
||||
|
||||
// if (plugin.getConfig().getBoolean("shop.allow-stacks") && info.getItem().getAmount() > 1) {//FIXME: need a better impl
|
||||
// price = CalculateUtil.divide(price,info.getItem().getAmount());
|
||||
// }
|
||||
double createCost = plugin.getConfig().getDouble("shop.cost");
|
||||
// Create the sample shop.
|
||||
|
||||
@@ -816,7 +814,12 @@ public class ShopManager {
|
||||
plugin.getLogger().log(Level.WARNING, "QuickShop can't pay tax to account in config.yml, Please set tax account name to a existing player!");
|
||||
}
|
||||
}
|
||||
ContainerShop shop = new ContainerShop(info.getLocation(), price, info.getItem(), new ShopModerator(p.getUniqueId()), false, ShopType.SELLING);
|
||||
|
||||
if (!plugin.getConfig().getBoolean("shop.allow-stacks")) { //Set to 1 when disabled
|
||||
info.getItem().setAmount(1);
|
||||
}
|
||||
|
||||
ContainerShop shop = new ContainerShop(info.getLocation(), CalculateUtil.multiply(price, info.getItem().getAmount()), info.getItem(), new ShopModerator(p.getUniqueId()), false, ShopType.SELLING);
|
||||
shop.onLoad();
|
||||
ShopCreateEvent e = new ShopCreateEvent(shop, p);
|
||||
if (Util.fireCancellableEvent(e)) {
|
||||
|
||||
Reference in new issue
Block a user