RA-Reforge
Author: RajaAditya Website: rajaaditya.my.id Version: 1.0.0 API: Paper 1.21.x
Features
GUI Reforge Menus
- Each menu is one file in
menus/, and the file name is the menu name used by/reforge open <name> - A menu can hold many recipes
- Menus open from a command, so they work with NPCs, signs, or other plugins, and they work properly for Bedrock players where shopkeeper-style NPC shops can break
- Menu size (
gui-size) and which slots are used (gui-slots) can be set per menu
Live Ingredient Checklist
- Every recipe icon shows a checklist of ingredients, scanned live from the player's inventory: a green tick when there is enough, and a red cross with the missing amount when there is not
- Clicking a complete recipe takes the items from the inventory automatically, with nothing to place in slots by hand
- Clicking an incomplete recipe does nothing but tells the player the materials are not enough
Instant and Delayed Results
- INSTANT recipes give the result right away
- DELAYED recipes process in the background, are saved in SQLite, and finish even if the GUI is closed or the player goes offline. The result is delivered when they are online again
- While processing, the recipe icon shows a live
hh:mm:sscountdown and cannot be clicked again
Limits
- Daily limit per recipe (
daily-limit), shown as "remaining today". It resets at midnight in the configured timezone - Stock for a recipe, a total amount that can be crafted by everyone
- Per-IP limit to stop one network from farming a recipe
- Usage is stored per player, per recipe, per day
NBT Matching
- Custom items from any plugin can be used as ingredients or results, such as gacha keys or custom fish from RA-FishingEvent, because the plugin reads raw NBT with NBT-API
- Matching reads simple values, while results are generated from a full snapshot (material, meta, count, and tags), so the reward is identical to the item you copied when making the recipe, including custom player head textures
In-Game Editor
/reforge adminopens an editor: choose or create a menu, add a recipe, and put the physical items into the Input, Material, and Result slots- The plugin extracts the NBT for you, and the recipe icon, name, and lore follow the item in the Result slot
- Non-item settings (duration, modes, limits) are entered through chat prompts
Dependencies
None. NBT-API is bundled. Storage is a local SQLite file.
Installation
- Place
RA-Reforge.jarinto yourplugins/folder - Fully stop and start the server. Do not use
/reloador only replace the file, because classes loaded for the first time (such as NBT-API) can fail with errors like "zip file closed" - Edit
config.ymlandmessages.yml - Create menus with
/reforge admin, or write files inmenus/
File Structure
text
1
plugins/RA-Reforge/
├── config.yml # Prefix, debug, timezone
├── messages.yml # All messages, placeholders {0}, {1}, ...
├── data.db # SQLite: pending jobs, daily usage
└── menus/
├── contoh.yml # Example menu, may be deleted
└── <menu>.yml # One file per menu, many recipes inside
Configuration
config.yml
yaml
1
prefix: "&8[&6Reforge&8] "
debug: false # true = detailed console logs
timezone: "Asia/Jakarta" # decides when "today" changes for daily limits
menus/<name>.yml (optional keys)
yaml
1
gui-size: 27 # multiple of 9, from 9 to 54
gui-slots: [10, 12, 14, 16] # slots used for recipes, in order
recipes:
example_recipe:
daily-limit: 20 # 0 = no limit
If gui-size and gui-slots are left out, the size follows the number of recipes and fills from slot 0.
messages.yml (excerpt)
yaml
1
craft-not-ready: "&cNot enough materials for this recipe."
craft-success: "&aReforge successful!"
craft-daily-limit-reached: "&cYou already reforged this recipe {0}x today (limit: {1}). Try again tomorrow."
craft-out-of-stock: "&cThis recipe is out of stock."
craft-ip-limit-reached: "&cYour IP has reached the purchase limit for this recipe ({0}x)."
delayed-started: "&aReforge started! Done in {0} seconds. The result arrives even if you close the GUI."
The numbered placeholders {0}, {1} are filled in by the plugin, so do not remove them.
Commands
| Command | Description | Access |
|---|---|---|
/reforge open <menu> | Open a reforge menu | Player |
/reforge admin | Open the in-game editor | reforge.admin |
/reforge reload | Reload config.yml, messages.yml, and every menu | reforge.admin |
Permissions
| Permission | Default | Description |
|---|---|---|
reforge.admin | op | Use the editor (/reforge admin) and /reforge reload |
Notes
- NBT-API must stay on a version that supports your Minecraft version. Versions below 2.12 crash on 1.20.5 and newer because item data moved to data components. If a new server version causes errors in
NBTReflectionUtil, update NBT-API when you rebuild - NBT-API is intentionally not relocated when shading, because it uses internal reflection that breaks when relocated
License
Developed by RajaAditya — rajaaditya.my.id