/** * Returns whether this player has an open inventory at the moment * or not. * * @return Whether this player is viewing an inventory or not */ default boolean isViewingInventory() { return getOpenInventory().isPresent(); }
/** * Returns whether this player has an open inventory at the moment * or not. * * @return Whether this player is viewing an inventory or not */ default boolean isViewingInventory() { return getOpenInventory().isPresent(); }
@Override public void setItem(final PlotInventory inv, final int index, final PlotItemStack item) { if (!inv.isOpen()) { return; } final SpongePlayer sp = (SpongePlayer) inv.player; final Player player = sp.player; player.getOpenInventory().get(); throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); }