Fix value change direction when buying/selling

This commit is contained in:
ChronosX88 2021-08-04 01:56:51 +03:00
parent 841779c52b
commit 8507257e01
Signed by: ChronosXYZ
GPG Key ID: 085A69A82C8C511A

View File

@ -123,7 +123,7 @@ public class InventoryEvents implements Listener {
playerInventory.removeItem(clickedItem);
}
addMoney(value, player);
valueChange(slot, value, true);
valueChange(slot, value, false);
stockChange(slot, stock, 1, true);
String message = OreMarket.main().getGuiConfig().getString("gui.messages.successfully-sold", "&aYou have successfully sold the item!");
@ -151,7 +151,7 @@ public class InventoryEvents implements Listener {
playerInventory.addItem(clickedItem);
}
takeMoney(value, player);
valueChange(slot, value, false);
valueChange(slot, value, true);
stockChange(slot, stock, 1, false);
String message = OreMarket.main().getGuiConfig().getString("gui.messages.successfully-bought", "&aYou have successfully bought the item!");
player.sendMessage(ChatColor.translateAlternateColorCodes('&', message));