src/main/java/de/dosmike/sponge/megamenus/AntiGlitch.java
public static void scanInventory(Player player) {
        List<ItemStackSnapshot> hits = new LinkedList<>();
        for (Inventory i : player.getInventory().slots()) {
            if (checkItemStack(player, i.peek().orElse(ItemStack.empty()))) {
                hits.add(i.peek().get().createSnapshot());
                i.clear();
            }
        }
        if (hits.size()>0)
            log(player, hits);
    }
/**
     * Scan this players inventory for itemstacks with injected NBT.
     * Every slot that is found containing prohibited items is cleared and
     * the player is called out.
     * @param player the players inventory to scan
     */
Scan this players inventory for itemstacks with injected NBT.
Every slot that is found containing prohibited items is cleared and
the player is called out.
@param player the players inventory to scan
Scan this players inventory for itemstacks with injected NBT . Every slot that is found containing prohibited items is cleared and the player is called out . @param player the players inventory to scan
public static void scanInventory(Player player) {
        List<ItemStackSnapshot> hits = new LinkedList<>();
        for (Inventory i : player.getInventory().slots()) {
            if (checkItemStack(player, i.peek().orElse(ItemStack.empty()))) {
                hits.add(i.peek().get().createSnapshot());
                i.clear();
            }
        }
        if (hits.size()>0)
            log(player, hits);
    }
public static void scanInventory ( Player player ) { List < ItemStackSnapshot > hits = new LinkedList < > ( ) ; for ( Inventory i : player . getInventory ( ) . slots ( ) ) { if ( checkItemStack ( player , i . peek ( ) . orElse ( ItemStack . empty ( ) ) ) ) { hits . add ( i . peek ( ) . get ( ) . createSnapshot ( ) ) ; i . clear ( ) ; } } if ( hits . size ( ) > 0 ) log ( player , hits ) ; }
Scan this players inventory for itemstacks with injected NBT.
Scan this players inventory for itemstacks with injected NBT .