Iterator<Map.Entry<Player, Inventory>> viewers = getViewers();
while (viewers.hasNext()) {
Map.Entry<Player, Inventory> entry = viewers.next();
Player player = entry.getKey();
Inventory inv = entry.getValue();
<BUG>int slot = item.getSlot(player, EMPTY_ITEM_ARRAY);
</BUG>
boolean hidden = item.getSettings().isHidden(plugin, player);
ItemStack is = inv.getItem(slot);
if (hidden && is != null) {

Iterator<Map.Entry<Player, Inventory>> viewers = getViewers();
while (viewers.hasNext()) {
Map.Entry<Player, Inventory> entry = viewers.next();
Player player = entry.getKey();
Inventory inv = entry.getValue();
int slot = item.getSlot(player, EMPTY_ITEM_ARRAY, null);
boolean hidden = item.getSettings().isHidden(plugin, player);
ItemStack is = inv.getItem(slot);
if (hidden && is != null) {
