()
| 51 | |
| 52 | //When called, an inventory is created and opened for the player |
| 53 | public void open() { |
| 54 | //The owner of the inventory created is the Menu itself, |
| 55 | // so we are able to reverse engineer the Menu object from the |
| 56 | // inventoryHolder in the MenuListener class when handling clicks |
| 57 | inventory = Bukkit.createInventory(this, getSlots(), getMenuName()); |
| 58 | |
| 59 | //grab all the items specified to be used for this menu and add to inventory |
| 60 | this.setMenuItems(); |
| 61 | |
| 62 | //open the inventory for the player |
| 63 | playerMenuUtility.getOwner().openInventory(inventory); |
| 64 | playerMenuUtility.pushMenu(this); |
| 65 | } |
| 66 | |
| 67 | public void back() throws MenuManagerException, MenuManagerNotSetupException { |
| 68 | MenuManager.openMenu(playerMenuUtility.lastMenu().getClass(), playerMenuUtility.getOwner()); |
no test coverage detected