Skip to content

Commit 2c5b85e

Browse files
author
Loki
committed
Modified interrupt detect logic for HotFix 2
1 parent 14ac8f8 commit 2c5b85e

File tree

1 file changed

+4
-3
lines changed
  • src/main/java/com/codehusky/huskyui/states

1 file changed

+4
-3
lines changed

src/main/java/com/codehusky/huskyui/states/Page.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,10 @@ public Inventory getPageView(int pagenum) {
288288
.property(InventoryDimension.PROPERTY_NAME, this.inventoryDimension)
289289
.of(this.inventoryArchetype)
290290
.listener(InteractInventoryEvent.class, event -> {
291+
if(event instanceof InteractInventoryEvent.Close){
292+
interrupt();
293+
return;
294+
}
291295
if (!(event instanceof InteractInventoryEvent.Open) && !(event instanceof InteractInventoryEvent.Close)) {
292296
event.setCancelled(true);
293297
try{
@@ -322,9 +326,6 @@ public Inventory getPageView(int pagenum) {
322326
} else {
323327
event.getCursorTransaction().setCustom(ItemStackSnapshot.NONE);
324328
event.getCursorTransaction().setValid(true);
325-
if((event instanceof InteractInventoryEvent.Close)) {
326-
interrupt();
327-
}
328329
}
329330
})
330331
.property(InventoryTitle.PROPERTY_NAME, InventoryTitle.of(this.title))

0 commit comments

Comments
 (0)