InvCraft

InvCraft

por poggit-archive
No disponible
VariosMecánicasEstadísticaspocketmine
5visitas
0descargas

Invcraft - A 6x6 crafting table plugin for PocketMine-MP

Feel free to report any bugs or suggest new features in Issues

Command & Permission

Command

/invcraft - Open InvCraft main menu

  • aliases: /ic

  • permission: ic.command

Permission

ic.command - Allow player to use /invcraft command including view and craft items

ic.admin - Allow player to use add, edit, remove recipes (will show additional options in menu for admin)

For developers (API Doc)

Recipes API

use NgLam2911\InvCraft\crafting\Recipe; use NgLam2911\InvCraft\InvCraft;

recipeManager=InvCraft::getInstance()−>getRecipeManager();//CreateanewreciperecipeManager = InvCraft::getInstance()->getRecipeManager(); // Create a new recipe recipe = new Recipe(); recipeManager−>addRecipe(recipeManager->addRecipe(recipe); // Remove a recipe recipeManager−>removeRecipe(<recipename>);//GetareciperecipeManager->removeRecipe(<recipe name>); // Get a recipe result = $recipeManager->getRecipe();

Handle when a player craft an item

use NgLam2911\InvCraft\event\InvCraftItemEvent;

// EventsListener.php public function onCraft(InvCraftItemEvent event) { player = event−>getPlayer();event->getPlayer(); recipe = event−>getRecipe();event->getRecipe(); result = $event->getResult(); // Do something here }