Skip to content

Commit

Permalink
🩹 Fix a bug where chests would get unlinked after modification
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven65 committed Jul 11, 2021
1 parent 521ef8b commit 6c7039d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public class ShopCreationGUI implements Listener {
private int quantity = 0;
private int stock = 0;

public String linkedChestLocation = "";

private String sellersNote;

private boolean isModifying = false;
Expand All @@ -62,6 +64,8 @@ public ShopCreationGUI (Location slabLocation, Shop shop) {
sellPrice = shop.sellPrice;
quantity = shop.quantity;

linkedChestLocation = shop.linkedChestLocation;

stock = shop.stock;

isAdmin = shop.admin;
Expand Down Expand Up @@ -92,6 +96,7 @@ public void resetGUI () {
stock = 0;

sellersNote = "";
linkedChestLocation = "";
}

public boolean getIsStage2 () {
Expand Down Expand Up @@ -216,6 +221,7 @@ public void onInventoryClick(final InventoryClickEvent e) {
shop.stock = stock;

shop.note = sellersNote;
shop.linkedChestLocation = linkedChestLocation;


ShopManager.put(ShopManager.locationToString(slabLocation), shop);
Expand Down

0 comments on commit 6c7039d

Please sign in to comment.