Class endstone::Enchantment¶
ClassList > endstone > Enchantment
Public Functions¶
Type | Name |
---|---|
virtual bool | canEnchantItem (const ItemStack & item) const = 0 |
virtual bool | conflictsWith (const Enchantment & other) const = 0 Check if this enchantment conflicts with another enchantment. |
virtual NamespacedKey | getKey () const = 0 Return the namespaced identifier for this enchantment. |
virtual int | getMaxLevel () const = 0 Gets the maximum level that this Enchantment may become. |
virtual int | getStartLevel () const = 0 Gets the level that this Enchantment should start at (also known as minimum level). |
virtual | ~Enchantment () = default |
Public Functions Documentation¶
function canEnchantItem¶
Checks if this Enchantment may be applied to the given ItemStack.
This does not check if it conflicts with any enchantments already applied to the item.
Parameters:
item
Item to test
Returns:
True if the enchantment may be applied, otherwise False
function conflictsWith¶
Check if this enchantment conflicts with another enchantment.
Parameters:
other
The enchantment to check against
Returns:
True if there is a conflict.
function getKey¶
Return the namespaced identifier for this enchantment.
Returns:
this enchantment's key
function getMaxLevel¶
Gets the maximum level that this Enchantment may become.
Returns:
Maximum level of the Enchantment
function getStartLevel¶
Gets the level that this Enchantment should start at (also known as minimum level).
Returns:
Starting level of the Enchantment
function ~Enchantment¶
The documentation for this class was generated from the following file include/endstone/enchantments/enchantment.h