Feel free to report any bugs or suggest new features in Issues
/invcraft
- Open InvCraft main menu- aliases:
/ic
- permission:
ic.command
- aliases:
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)
- MySQL, SQLite database support.
- Multi-pattern matching like vanilla crafting table.
- Work with any items, including custom items (if you have a plugin that can create custom items).
- Languages support
- Custom ingredients, result process
- Any meta match, EX: Any planks
- Transfer NBT from ingredients to result
- Custom, advanced API for developers
And more...
You can use pharynx to build this plugin, if pharynx is in your server path and you have cloned this repo into your plugins folder, you can use following cmd:
php -dphar.readonly=0 pharynx.phar -c -i plugins/InvCraft -p=plugins/InvCraft.phar
or you can find the lastest build in Poggit
This rewrite version is NOT compatible with the old version, i currently dont have any idea for converting old recipes to the new format, so you have to create them again.
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
}