Custom Super Pickaxe Class
unknown
php
a month ago
1.1 kB
1
Indexable
<?php declare(strict_types=1); namespace ipad54\skillcustomitems\item; use customiesdevs\customies\item\component\DisplayNameComponent; use customiesdevs\customies\item\component\DurabilityComponent; use customiesdevs\customies\item\CreativeInventoryInfo; use customiesdevs\customies\item\ItemComponents; use customiesdevs\customies\item\ItemComponentsTrait; use pocketmine\item\ItemIdentifier; use pocketmine\item\Pickaxe; use pocketmine\item\ToolTier; class SuperPickaxe extends Pickaxe implements SkillCustomItem, ItemComponents{ use ItemComponentsTrait; public function __construct(ItemIdentifier $identifier, private readonly string $customItemIdentifier, string $name = "Unknown"){ parent::__construct($identifier, $name, ToolTier::NETHERITE); $this->initComponent($this->customItemIdentifier, new CreativeInventoryInfo(CreativeInventoryInfo::CATEGORY_EQUIPMENT)); $this->addComponent(new DisplayNameComponent("§5Super Pickaxe")); $this->addComponent(new DurabilityComponent(450)); } public function getIdentifier() : string{ return $this->customItemIdentifier; } }
Editor is loading...
Leave a Comment