Class RefRegistry
- java.lang.Object
-
- xyz.srnyx.annoyingapi.reflection.org.bukkit.RefRegistry
-
public class RefRegistry extends java.lang.Objectorg.bukkit.Registry
-
-
Field Summary
Fields Modifier and Type Field Description static @Nullable java.lang.ObjectEFFECT_FIELD1.20.3+ org.bukkit.Registry#EFFECTstatic @Nullable java.lang.ObjectENCHANTMENT_FIELD1.14+ org.bukkit.Registry#ENCHANTMENTstatic @Nullable java.lang.reflect.MethodGET_METHOD1.14+ org.bukkit.Registry#get(NamespacedKey)static @Nullable java.lang.Class<?>REGISTRY_CLASS1.14+ org.bukkit.Registry
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull java.util.Optional<org.bukkit.potion.PotionEffectType>getEffect(@NotNull java.lang.String name)Get aPotionEffectTypeby name, using reflection if neededstatic @NotNull java.util.Optional<org.bukkit.enchantments.Enchantment>getEnchantment(@NotNull java.lang.String name)Get anEnchantmentby name, using reflection if needed
-
-
-
Field Detail
-
REGISTRY_CLASS
@Nullable public static final @Nullable java.lang.Class<?> REGISTRY_CLASS
1.14+ org.bukkit.Registry
-
GET_METHOD
@Nullable public static final @Nullable java.lang.reflect.Method GET_METHOD
1.14+ org.bukkit.Registry#get(NamespacedKey)
-
EFFECT_FIELD
@Nullable public static final @Nullable java.lang.Object EFFECT_FIELD
1.20.3+ org.bukkit.Registry#EFFECT
-
ENCHANTMENT_FIELD
@Nullable public static final @Nullable java.lang.Object ENCHANTMENT_FIELD
1.14+ org.bukkit.Registry#ENCHANTMENT
-
-
Method Detail
-
getEffect
@NotNull public static @NotNull java.util.Optional<org.bukkit.potion.PotionEffectType> getEffect(@NotNull @NotNull java.lang.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 java.util.Optional<org.bukkit.enchantments.Enchantment> getEnchantment(@NotNull @NotNull java.lang.String name)Get anEnchantmentby name, using reflection if needed- Parameters:
name- the name of the enchantment- Returns:
- the
Enchantment
-
-