(@NotNull ItemStack item)
| 353 | } |
| 354 | |
| 355 | @NotNull |
| 356 | public static Potion fromItemStack(@NotNull ItemStack item) { |
| 357 | Validate.notNull(item, "item cannot be null"); |
| 358 | if (item.getType() != Material.POTION) |
| 359 | throw new IllegalArgumentException("item is not a potion"); |
| 360 | return fromDamage(item.getDurability()); |
| 361 | } |
| 362 | |
| 363 | /** |
| 364 | * Returns an instance of {@link PotionBrewer}. |
nothing calls this directly
no test coverage detected