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
.
Craftings are stored in the craftings
folder. However, if you want to, you can create subfolders, and place craftings files inside so you can organize everything in a better way (per category for example). Useful when having a lot of craftings.
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
).
All items in the plugin (except required items), even the ones placed in the inventories.yml
file follow the same structure and contain the same properties.
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
Item potion data
Item book enchants
You 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.
You can completely remove the 'requires' option, meaning the crafting will not need required items and instead you can use extra requirements.
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.
Op players or players with the ecraft.bypass.cooldowns
permission will completely bypass this cooldown.
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
Whether the item to craft should be saved as an EXACT COPY of the original item. You should not modify this option, and let the plugin add it to the config automatically when using /ecraft create <name> original
. Click HERE to know more.
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
This will add a probability of success to the crafting. For example, if the chance is set to 25 it means that there will be a 75% of chance to fail, and lose the used items. On the fail_actions
property you can use all EpicCraftingsPlus actions found HERE. These actions will be executed if the player fails creating the crafting.
Players can override the chance set on this property with the ecraft.successrate.<crafting>.<chance>
permission.
Actions When Crafted
For each crafting you can specify different actions to be executed when the player craft the item. This allows you to craft not only items but commands (maybe to give money or execute custom console commands to the player). You can use all EpicCraftingsPlus actions found HERE.
You can add the [count_as_item] prefix before an action to make the action require an empty slot on the player inventory.
Actions When Cooldown Starts
You can optionally add actions to execute when the player consumes the required items and the cooldown for the crafting starts. You can use all EpicCraftingsPlus actions found HERE.
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
Information about this option HERE.
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