OmniTools
OmniTools are the heart of the plugin. They are highly customizable items that can hold custom enchants, have unique appearances, and interact with other plugin features. They are not vanilla tools, but entirely new items controlled by the plugin.
Creating an OmniTool
To create a new OmniTool, you create a new .yml
file in the plugins/EdTools/tools/
folder. The name of the file becomes the Tool ID (e.g., crop-tool.yml
has the ID crop-tool
).
Example: tools/crop-tool.yml
# The ID of the GUI to open when the player interacts with this tool.
# This corresponds to a file in the /guis/ folder.
gui: 'crop'
# Defines the item's appearance and properties.
item:
material: DIAMOND_HOE
unbreakable: true
name: '&b&lBasic Hoe'
lore:
- "&8ꜰᴀʀᴍɪɴɢ ᴛᴏᴏʟ"
- "&3"
- "&7Owner: &f{player}"
- "&3"
- "&b&lEnchants: &7({total-enchants})"
# Conditional Lore: This line only appears if the enchant level is greater than 0.
- "if({crop-fortune-level} > 0) then &r &b| &9Fortune &d%edtools_notation_{crop-fortune-level}%"
- "if({crop-coingreed-level} > 0) then &r &b| &6Coin Greed &a%edtools_notation_{crop-coingreed-level}%"
gui
: The ID of a GUI file from the/guis/
folder that this tool will open.item
: An Item Container section that defines what the tool looks like. The lore supports placeholders to display dynamic information and conditional lines withif(condition) then text
.
NBT Data Tags
When omnitool.store-data-in-nbt
is enabled in config.yml
, all of an OmniTool's data is stored directly on the item itself. This is useful for developers or advanced server owners who need to inspect or modify item data.
edtools_omnitool_uuid
: A unique UUID for this specific item instance.edtools_omnitool_owner
: The Minecraft UUID of the player who first received the tool.edtools_omnitool_owner_display
: The display name of the owner.edtools_omnitool_tool
: The ID of the tool configuration (e.g.,crop-tool
).edtools_omnitool_version
: Internal plugin version for this tool's data structure.edtools_enchant_level_<enchant_id>
: Stores the level of a specific enchant (e.g.,edtools_enchant_level_crop-fortune
).edtools_enchant_disabled_<enchant_id>
: Stores whether an enchant is toggled off by the player.
Was this helpful?