Fixed a bug where Buy shop signs would display how much there was to

sell as the amount, instead of how much space is available.
dev
sigonasr2 9 years ago
parent febc66b16a
commit e8b6d1c109
  1. BIN
      TwosideKeeper.jar
  2. 2
      src/sig/plugin/TwosideKeeper/TwosideKeeper.java

Binary file not shown.

@ -2400,7 +2400,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
int shopID = TwosideShops.GetShopID(s);
WorldShop shop = TwosideShops.LoadWorldShopData(shopID);
Chest c = (Chest)chest.getState();
shop.UpdateAmount(GenericFunctions.CountItems(c.getInventory(), shop.GetItem()));
shop.UpdateAmount(GenericFunctions.CountEmptySpace(c.getInventory(), shop.GetItem()));
TwosideShops.UpdateSign(shop, shop.getID(),s,shop.isPurchaseShopSign(s));
TwosideShops.SaveWorldShopData(shop);
Location newloc = ev.getClickedBlock().getLocation().add(-ev.getBlockFace().getModX()+0.5, -ev.getBlockFace().getModY()+1.5, -ev.getBlockFace().getModZ()+0.5);

Loading…
Cancel
Save