EnchantmentInstance
in package
Container for enchantment data applied to items.
Note: This class is assumed to be immutable. Consider this before making alterations.
Table of Contents
- $enchantment : Enchantment
- $level : int
- __construct() : mixed
- EnchantmentInstance constructor.
- getLevel() : int
- Returns the level of the enchantment.
- getType() : Enchantment
- Returns the type of this enchantment.
Properties
$enchantment
private
Enchantment
$enchantment
$level
private
int
$level
Methods
__construct()
EnchantmentInstance constructor.
public
__construct(Enchantment $enchantment[, int $level = 1 ]) : mixed
Parameters
- $enchantment : Enchantment
-
Enchantment type
- $level : int = 1
-
Level of enchantment
Return values
mixed —getLevel()
Returns the level of the enchantment.
public
getLevel() : int
Return values
int —getType()
Returns the type of this enchantment.
public
getType() : Enchantment