By continuing to use this site, you agree to the Terms of Service of this website, including usage of cookies.
OK, Don't show this again
Feel free to report any bugs or suggest new features in Issues
/invcraft
- Open InvCraft main menu
/ic
ic.command
ic.command
- Allow player to use /invcraft
command including view and craft itemsic.admin
- Allow player to use add, edit, remove recipes (will show additional options in menu for admin)use NgLam2911\InvCraft\crafting\Recipe;
use NgLam2911\InvCraft\InvCraft;
$recipeManager = InvCraft::getInstance()->getRecipeManager();
// Create a new recipe
$recipe = new Recipe(<args here>);
$recipeManager->addRecipe($recipe);
// Remove a recipe
$recipeManager->removeRecipe(<recipe name>);
// Get a recipe
$result = $recipeManager->getRecipe(<recipe name>);
use NgLam2911\InvCraft\event\InvCraftItemEvent;
// EventsListener.php
public function onCraft(InvCraftItemEvent $event) {
$player = $event->getPlayer();
$recipe = $event->getRecipe();
$result = $event->getResult();
// Do something here
}
Reply to review by :
You can leave one review per plugin release, and delete or update your review at any time