Skip to content

Commit

Permalink
v1.8.3.2
Browse files Browse the repository at this point in the history
- Fix something
  • Loading branch information
Jake-Moore committed Oct 17, 2023
1 parent ac0dc44 commit 79c2d8c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.kamikazejamplugins</groupId>
<artifactId>kamicommon</artifactId>
<version>1.8.3.1</version>
<version>1.8.3.2</version>
<packaging>jar</packaging>

<name>KamiCommon</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public abstract class AbstractKamiMenu extends MenuHolder implements Menu {
private Consumer<InventoryCloseEvent> closeHandler;
private Consumer<InventoryCloseEvent> instantCloseHandler;
private MenuUpdate updateHandler;
private boolean clearBeforeUpdate = false;
private boolean allowItemPickup;

public AbstractKamiMenu() {}
Expand Down Expand Up @@ -134,5 +135,10 @@ public void setUpdateHandler(MenuUpdate updateHandler) {
MenuTask.getAutoUpdateInventories().add(this);
}

@Override
public void setClearBeforeUpdate(boolean b) {
this.clearBeforeUpdate = b;
}

public abstract void setItem(int slot, IBuilder stack, Player forPlaceholders);
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void update() {
MenuUpdate menuUpdate = getUpdateHandler();

if (menuUpdate != null) {
clear();
if (isClearBeforeUpdate()) { clear(); }
menuUpdate.onUpdate();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ default void setItem(IBuilder stack, int slot, Player forPlaceholders) {

void setUpdateHandler(MenuUpdate update);

void setClearBeforeUpdate(boolean clearBeforeUpdate);

void update();

void setAutoUpdate();
Expand Down

0 comments on commit 79c2d8c

Please sign in to comment.