public static ItemInfo itemByStack(ItemStack itemStack) {
        if (itemStack == null) {
            return null;
        }

        for (ItemInfo item : items) {
            if (itemStack.getType().equals(item.getType()) && item.isDurable()) {
                return item;
            } else if (itemStack.getType().equals(item.getType()) && item.getSubTypeId() == itemStack.getDurability()) {
                return item;
            }
        }

        return null;
    }