Craftings Tutorial
In this page you will find all properties of craftings configuration files. Everytime you modify something in these files you must reload the plugin using /ecraft reload
.
Item
This is the item to be crafted. It is automatically saved when using /ecraft create
but you can modify its options (only if you save the crafting using /ecraft create <name> configurable
).
Category
All craftings must belong to a category which is specified in this option. Must be a valid category name from the categories.yml
file.
Requires
These are the required items to craft the main item. They are automatically saved when using /ecraft create
. I don't recommend you to modify them manually since it is more difficult than editing the main item. If you want to change them use /ecraft edit <name>
.
Very important information:
The plugin uses different item properties when checking for required items in players inventories. These properties are:
Item id
Item durability/datavalue
Item name
Item lore
Item enchants
Item custom model data (1.16-1.21.3)
Item potion data
Item book enchants
Item model (1.21.4+)
You can manually add the "dont_remove"
property at the end of a required item line, to prevent this item being removed from the player inventory.
You can also manually add the "hide_flags"
property at the end of a required item line, to hide all the flags from this item in particular.
Priority
Since craftings are stored in they own file, there is no way to order them in the inventory. That's why you can use the priority option. A higher priority number means it will be placed at last. Each time you create a new crafting using the /ecraft create
command, a higher priority number (higher than the last crafting from this category) is automatically selected.
Cooldown
You can set a cooldown to a crafting, meaning the player will have to wait until the item/crafting is created. The cooldown is set in seconds.
Cooldown Bypass Cost
You can add this option to allow players to bypass the cooldown using money. You need Vault for this option to work. To bypass the cooldown players will need to RIGHT CLICK on the crafting, this will open the bypass_cooldown_menu
inventory from inventory.yml
file.
Permission
This option allows you to set a permission to craft this item.
Permission Error Message
If this option is present, a custom error message will be send (instead of the default one) when trying to open the crafting but the player doesn't have permissions.
Save Original Item
One Time
If you set this option to true, players will be able to craft this item just one time.
One Time Error Message
If this option is present, a custom error message will be send (instead of the default one) when trying to open the crafting but the player already crafted it and one time is enabled.
Craft With Money
Adding this option will let players buy the item instead of crafting it. This will add the craft_with_money
custom item from inventories.yml
file. You need Vault for this option to work.
Players will need the ecraft.use.craftwithmoney permission to craft with money.
Hide Required Items Flags
You can set this option to true to completely hide all required item flags, like attributes, enchantments, potion data, etc. This is only visual.
Ignore Required Items Properties
These options will allow players to craft the item, ignoring some required items properties. For example, if the required item is a Diamond, and you want players to be able to use regular diamonds but also enchanted diamonds, then you must set ignore_required_items_enchants
on true.
Success Rate
Actions When Crafted
Actions When Cooldown Starts
No Item
If you are using the Actions when Crafted property, sometimes you will only want to execute a console command instead of giving an item. If you set this option to true, the player will not receive the item.
Extra Requirements
Random Craftings
This option allows a crafting to give a random crafting to the player when created. You must use the following format: <crafting_name>;<probability>
. The <crafting_name>
should be an already created crafting. It's not necessary that probabilities sum 100%.
Requires Lore Custom Character
You can add this option to craftings and choose an alternative character (like '-') to separate lore lines of required items in the file. This will help you if you are using the default separation lore character ('|') in the lore of a required item.
Last updated