Skip to content

Commit

Permalink
Fixed 'Menu not instance of EcoMenu!' bug
Browse files Browse the repository at this point in the history
  • Loading branch information
WillFP committed Jul 21, 2021
1 parent 800e83d commit 2c12f78
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ public void handleClose(@NotNull final InventoryCloseEvent event) {

Menu menu = MenuHandler.getMenu(event.getInventory());

if (menu == null) {
return;
}

Validate.isTrue(menu instanceof EcoMenu, "Menu not instance of EcoMenu!");

EcoMenu ecoMenu = (EcoMenu) menu;
Expand Down

0 comments on commit 2c12f78

Please sign in to comment.