MCPcopy Create free account
hub / github.com/Teneted/Tenet / getEffectType

Method getEffectType

src/main/java/org/bukkit/potion/PotionEffect.java:104–112  ·  view source on GitHub ↗
(@NotNull Map<?, ?> map)

Source from the content-addressed store, hash-verified

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);

Callers 1

PotionEffectMethod · 0.95

Calls 2

getIntMethod · 0.95
getByIdMethod · 0.95

Tested by

no test coverage detected