nglam2911 / invcraft
Bigger crafting table plugin for PocketMine-MP
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 15
Watchers: 2
Forks: 2
Open Issues: 0
Type:pocketmine-plugin
Requires
- php: ^8.2
- dktapps/pmforms: ^2.2
- muqsit/invmenu: ^4.6.5
- pocketmine/pocketmine-mp: ^5.3.0
- sof3/await-generator: ^3.6
- sof3/libasynql: ^4.2
Requires (Dev)
- sof3/pharynx: ^0.3.6
This package is auto-updated.
Last update: 2025-03-29 01:08:33 UTC
README
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
- aliases:
Permission
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)
News in this version
- 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).
Planned for future update
- 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...
Build from s a u c e
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.
For developers (API Doc)
Recipes API
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>);
Handle when a player craft an item
use NgLam2911\InvCraft\event\InvCraftItemEvent; // EventsListener.php public function onCraft(InvCraftItemEvent $event) { $player = $event->getPlayer(); $recipe = $event->getRecipe(); $result = $event->getResult(); // Do something here }