Class AbstractEnchantID
java.lang.Object
com.kamikazejam.kamicommon.nms.abstraction.enchantid.AbstractEnchantID
Abstract class providing version-specific implementations for retrieving
namespaced identifiers of Minecraft enchantments.
This abstraction handles the differences in enchantment identification across different Minecraft versions, particularly the transition from numeric IDs to namespaced identifiers that occurred in 1.13+.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract @NotNull String
getNamespaced
(Enchantment enchantment) Retrieves the namespaced identifier for the given enchantment.
-
Constructor Details
-
AbstractEnchantID
public AbstractEnchantID()
-
-
Method Details
-
getNamespaced
Retrieves the namespaced identifier for the given enchantment.This method returns the string representation of an enchantment that can be used for serialization, configuration storage, or cross-version compatibility. The format may vary depending on the Minecraft version.
- Parameters:
enchantment
- theEnchantment
to get the identifier for- Returns:
- the namespaced string identifier for the enchantment (i.e. "minecraft:sharpness")
-