File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/main/java/com/codehusky/huskyui/states Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff 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 ))
You can’t perform that action at this time.
0 commit comments