Autocrafter inventory protection for Minecraft servers.
Prevents autocrafters from depleting ingredient slots below 1 item.
Useful Autocrafter is an open-source Paper plugin that fixes a common autocrafter problem: the vanilla autocrafter consumes all items in a slot and stops, leaving the recipe unfillable until the slot is manually restocked. This plugin intercepts every craft attempt and cancels it if any enabled slot is down to its last item, ensuring autocrafters always retain at least 1 item per slot as a buffer. Enabled by default with no configuration required.
- Last-item protection: Cancels any crafting attempt where at least one enabled slot holds exactly 1 item, guaranteeing a minimum of 1 item is always retained per slot
- Per-slot awareness: Respects the vanilla crafter's disabled-slot toggle - only enabled slots are checked, disabled slots are ignored
- Runtime toggle: Enable or disable protection on a running server without a restart using
/usefulcrafter on|off - Zero configuration: No
config.ymlrequired - the plugin works immediately after installation with sensible defaults
- Server Software:
Paperonly (CrafterCraftEventandCrafterblock state API are Paper-exclusive) - Minecraft Versions:
1.21and higher (autocrafter block requires 1.21+) - Java Requirements:
Java 21+ - Dependencies: None - no external plugins required
Before installing Useful Autocrafter, confirm the following requirements are met:
- A Minecraft server running Paper or a Paper fork (Purpur, etc.)
- Server version 1.21 or higher
- Java 21 or newer installed on the machine running the server
- Operator or console access to install plugin files
Spigot and CraftBukkit are not supported - the plugin relies on Paper's CrafterCraftEvent and Crafter inventory API which are Paper-only.
- Download the latest
Useful-Autocrafters-x.x.x.jarfrom the Releases page - Stop your server completely before placing any files
- Copy the
.jarinto your server'splugins/directory - Start the server - protection is active immediately, no configuration needed
- Run
/pluginsin-game -Useful-Autocraftersshould appear green in the list - Run
/usefulcrafterto confirm the plugin reportsENABLEDstatus - Place an autocrafter with a crafting recipe and fill ingredient slots with exactly 1 item each - crafting should be blocked
- Fill ingredient slots with 2+ items each - crafting should proceed normally
The plugin listens to Paper's CrafterCraftEvent at HIGHEST priority. Every time an autocrafter attempts to produce an output item, the event handler:
- Retrieves the
Crafterblock state from the event's block - Iterates all 9 crafting slots (indices 0-8)
- For each slot that is not disabled in the crafter UI, checks if the slot holds exactly 1 item
- If any enabled slot is at exactly 1 item, the event is cancelled and no output is produced
- If all enabled slots have 2 or more items (or are empty), crafting proceeds normally
When protection fires, the autocrafter silently skips the craft cycle. No message is sent to players. The autocrafter will resume crafting automatically once the slot is restocked above 1 item.
Important: The plugin state (enabled/disabled) is not persisted across server restarts. The plugin always starts in the enabled state. If you need protection disabled permanently, use /usefulcrafter off after each restart or remove the plugin.
All commands require the usefulautocrafters.toggle permission (operator by default).
Root command: /usefulcrafter
Aliases: /uac, /ucraft
| Command | Description |
|---|---|
/usefulcrafter |
Show current enabled/disabled status |
/usefulcrafter on |
Enable last-item protection (also accepts enable) |
/usefulcrafter off |
Disable last-item protection (also accepts disable) |
| Permission | Description | Default |
|---|---|---|
usefulautocrafters.toggle |
Toggle protection on or off via /usefulcrafter |
op |
Useful Autocrafter uses Apache Maven as its build system.
Requirements:
- Java 21 or newer
- Apache Maven 3.6 or newer
Steps:
# Clone the repository
git clone https://github.com/Cobbleworks/Useful-Autocrafter-Plugin.git
cd Useful-Autocrafter-Plugin
# Compile and package
mvn clean packageThe output JAR is written to target/Useful-Autocrafters-x.x.x.jar. Copy it into your server's plugins/ folder as described in the Installation Steps section.
Project Structure:
src/main/
├── java/com/usefulautocrafters/
│ ├── UsefulAutocrafters.java - Plugin entry point (onEnable / onDisable)
│ ├── AutocrafterListener.java - CrafterCraftEvent handler, last-item check logic
│ └── UsefulCrafterCommand.java - /usefulcrafter command + tab completion
└── resources/
└── plugin.yml - Plugin metadata, commands, permissions
This project is licensed under the MIT License - see the LICENSE file for details.
