* @param itemType of the item
* @param def to return for invalid items
* @return max stacking size
*/
public static int getMaxSize(Material itemType, int def) {
Item item = CommonNMS.getItem(itemType);
return item == null ? def : item.getMaxStackSize();
}