Skip to content

alvin-pm-pl/libItemRegistrar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libItemRegistrar

A general library-like plugin to manage (custom) items. (PM5)

Usage

Overriding pre-existing item (Fishing Rod)

libItemRegistrar::getInstance()->registerItem(new class(new ItemIdentifier(ItemTypeIds::FISHING_ROD), "Fishing Rod") extends Item{
    public function onClickAir(Player $player, Vector3 $directionVector) : ItemUseResult{
	    $player->sendMessage("Hello world!");
	    return ItemUseResult::SUCCESS();
    }
}, libItemRegistrar::getInstance()->getRuntimeIdByName("Fishing Rod"), true); // https://github.com/pmmp/BedrockData/blob/modern-world-support/required_item_list.json#L1843

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages