(@NotNull Map<?, ?> map)
| 102 | } |
| 103 | |
| 104 | @NotNull |
| 105 | private static PotionEffectType getEffectType(@NotNull Map<?, ?> map) { |
| 106 | int type = getInt(map, TYPE); |
| 107 | PotionEffectType effect = PotionEffectType.getById(type); |
| 108 | if (effect != null) { |
| 109 | return effect; |
| 110 | } |
| 111 | throw new NoSuchElementException(map + " does not contain " + TYPE); |
| 112 | } |
| 113 | |
| 114 | private static int getInt(@NotNull Map<?, ?> map, @NotNull Object key) { |
| 115 | Object num = map.get(key); |
no test coverage detected