code: public static <T extends Item> List<T> getAllItems(final ItemGroup root, Class<T> type) {
          List<T> r = new ArrayList<>();
          getAllItems(root, type, r);
          return r;
      }
docs: Gets all the {@link Item}s recursively in the {@link ItemGroup} tree
  and filter them by the given type. The returned list will represent a snapshot view of the items present at some
  time during the call. If items are moved during the call, depending on the move, it may be possible for some
  items to escape the snapshot entirely.
  <p>
  If you do not need to iterate all items, or if the order of the items is not required, consider using
  {@link #allItems(ItemGroup, Class)} instead.
  
  @since 1.512