PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
|
Enumerations | |
enum | BoatType { getWoodType } |
enum | GoatHornType { DREAM } |
enum | ItemUseResult { SUCCESS } |
enum | MedicineType { getMetadata } |
enum | PotionType { getMetadata } |
enum | SuspiciousStewType { getEffects } |
enum | ToolTier { meta } |
Functions | |
addEnchantment (EnchantmentInstance $enchantment) | |
getEnchantment (Enchantment $enchantment) | |
getEnchantmentLevel (Enchantment $enchantment) | |
getEnchantments () | |
hasEnchantment (Enchantment $enchantment, int $level=-1) | |
hasEnchantments () | |
removeEnchantment (Enchantment $enchantment, int $level=-1) | |
removeEnchantments () | |
Variables | |
trait | ItemEnchantmentHandlingTrait |
All the Item classes
enum pocketmine::item::BoatType |
Definition at line 28 of file BoatType.php.
enum pocketmine::item::GoatHornType |
Definition at line 26 of file GoatHornType.php.
enum pocketmine::item::ItemUseResult |
Definition at line 26 of file ItemUseResult.php.
Enumerator | |
---|---|
getMetadata | @phpstan-return array{0: string, 1: Effect} @phpstan-return TMetadata |
Definition at line 29 of file MedicineType.php.
@phpstan-type TMetadata array{0: string, 1: \Closure() : list<EffectInstance>}
Enumerator | |
---|---|
getMetadata | @phpstan-return array{0: string, 1: Effect} @phpstan-return TMetadata |
Definition at line 33 of file PotionType.php.
Enumerator | |
---|---|
getEffects |
|
Definition at line 29 of file SuspiciousStewType.php.
@phpstan-type TMetadata array{0: int, 1: int, 2: int, 3: int, 4: int}
Enumerator | |
---|---|
meta | This function exists only to permit the use of named arguments and to make the code easier to read in PhpStorm. @phpstan-return TMetadata |
Definition at line 29 of file ToolTier.php.
pocketmine\item\addEnchantment | ( | EnchantmentInstance | $enchantment | ) |
Definition at line 75 of file ItemEnchantmentHandlingTrait.php.
pocketmine\item\getEnchantment | ( | Enchantment | $enchantment | ) |
Definition at line 48 of file ItemEnchantmentHandlingTrait.php.
pocketmine\item\getEnchantmentLevel | ( | Enchantment | $enchantment | ) |
Returns the level of the enchantment on this item with the specified ID, or 0 if the item does not have the enchantment.
Definition at line 91 of file ItemEnchantmentHandlingTrait.php.
pocketmine\item\getEnchantments | ( | ) |
Definition at line 83 of file ItemEnchantmentHandlingTrait.php.
Referenced by pocketmine\item\Armor\getEnchantmentProtectionFactor().
pocketmine\item\hasEnchantment | ( | Enchantment | $enchantment, |
int | $level = -1 ) |
Definition at line 43 of file ItemEnchantmentHandlingTrait.php.
pocketmine\item\hasEnchantments | ( | ) |
Definition at line 39 of file ItemEnchantmentHandlingTrait.php.
pocketmine\item\removeEnchantment | ( | Enchantment | $enchantment, |
int | $level = -1 ) |
Definition at line 55 of file ItemEnchantmentHandlingTrait.php.
pocketmine\item\removeEnchantments | ( | ) |
Definition at line 67 of file ItemEnchantmentHandlingTrait.php.
trait pocketmine::item\ItemEnchantmentHandlingTrait |
This trait encapsulates all enchantment handling needed for itemstacks. The primary purpose of this trait is providing scope isolation for the methods it contains.
Definition at line 35 of file ItemEnchantmentHandlingTrait.php.