コード例 #1
0
 private ItemStack verifyItemStack(String[] args, int curIndex, AtomicInteger numUsedStrings) {
   ItemStack is = InventoryUtil.getItemStack(args[curIndex]);
   if (is == null) {
     throw new IllegalArgumentException("Error parsing item " + args[curIndex]);
   }
   numUsedStrings.set(1);
   return is;
 }
コード例 #2
0
 private Material verifyMaterial(String[] args, int curIndex, AtomicInteger numUsedStrings) {
   Material mat = InventoryUtil.getMat(args[curIndex]);
   if (mat == null) {
     throw new IllegalArgumentException("Error parsing block " + args[curIndex]);
   }
   numUsedStrings.set(1);
   return mat;
 }