Documentation

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

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

Search results