Class RefRegistry
java.lang.Object
xyz.srnyx.annoyingapi.reflection.org.bukkit.RefRegistry
org.bukkit.Registry
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final @Nullable Object1.20.3+ org.bukkit.Registry#EFFECTstatic final @Nullable Object1.14+ org.bukkit.Registry#ENCHANTMENTstatic final @Nullable Method1.14+ org.bukkit.Registry#get(NamespacedKey)static final @Nullable Class<?> 1.14+ org.bukkit.Registry -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Optional<org.bukkit.potion.PotionEffectType> Get aPotionEffectTypeby name, using reflection if neededstatic @NotNull Optional<org.bukkit.enchantments.Enchantment> getEnchantment(@NotNull String name) Get anEnchantmentby name, using reflection if needed
-
Field Details
-
REGISTRY_CLASS
1.14+ org.bukkit.Registry -
GET_METHOD
1.14+ org.bukkit.Registry#get(NamespacedKey) -
EFFECT_FIELD
1.20.3+ org.bukkit.Registry#EFFECT -
ENCHANTMENT_FIELD
1.14+ org.bukkit.Registry#ENCHANTMENT
-
-
Method Details
-
getEffect
@NotNull public static @NotNull Optional<org.bukkit.potion.PotionEffectType> getEffect(@NotNull @NotNull String name) Get aPotionEffectTypeby name, using reflection if needed- Parameters:
name- the name of the potion effect- Returns:
- the
PotionEffectType
-
getEnchantment
@NotNull public static @NotNull Optional<org.bukkit.enchantments.Enchantment> getEnchantment(@NotNull @NotNull String name) Get anEnchantmentby name, using reflection if needed- Parameters:
name- the name of the enchantment- Returns:
- the
Enchantment
-