@Test public void inventoryClosed() { PlayerPages playerPages = mock(PlayerPages.class); SlotActions slotActions = mock(SlotActions.class); MultiPageListener multiPageListener = new MultiPageListener( mock(PageSwitcher.class), slotActions, playerPages ); InventoryView inventoryView = mock(InventoryView.class); when(inventoryView.getPlayer()).thenReturn(mock(HumanEntity.class)); InventoryCloseEvent inventoryCloseEvent = new InventoryCloseEvent( inventoryView ); multiPageListener.inventoryClosed(inventoryCloseEvent); verify(playerPages).removePlayer(any()); }
@EventHandler public void inventoryClosed(InventoryCloseEvent e) { playerPages.removePlayer(e.getPlayer().getUniqueId()); }
MultiPageListener implements Listener { @EventHandler public void inventoryClosed(InventoryCloseEvent e) { playerPages.removePlayer(e.getPlayer().getUniqueId()); } }
MultiPageListener implements Listener { @EventHandler public void inventoryClosed(InventoryCloseEvent e) { playerPages.removePlayer(e.getPlayer().getUniqueId()); }  }
MultiPageListener implements Listener { @EventHandler public void inventoryClosed(InventoryCloseEvent e) { playerPages.removePlayer(e.getPlayer().getUniqueId()); }  @EventHandler void inventoryClicked(InventoryClickEvent e); @EventHandler void inventoryClosed(InventoryCloseEvent e); @EventHandler void quit(PlayerQuitEvent event); }
MultiPageListener implements Listener { @EventHandler public void inventoryClosed(InventoryCloseEvent e) { playerPages.removePlayer(e.getPlayer().getUniqueId()); }  @EventHandler void inventoryClicked(InventoryClickEvent e); @EventHandler void inventoryClosed(InventoryCloseEvent e); @EventHandler void quit(PlayerQuitEvent event);  }