Namespace System
. Why Use Namespaces?
Scale & Clarity: Keep weapons, tools, cosmetics, and other item sets in separate folders.
Collaboration: Easily share or swap out entire namespaces without touching others.
GUI Organization: The in-game browser lists each namespace as its own category tab.
2. Directory Layout
All namespaces live under the customs
folder inside the plugin’s data folder:
weapons/
,tools/
,default/
, etc. are your namespaces.Each namespace folder must contain a single
customs.yml
file with that namespace’s item definitions.
3. Creating a New Namespace
Create a folder inside
plugins/CoreItems/customs/
.Name it for your item group (e.g.,
gadgets
,armor
,fun
).Inside, add a
customs.yml
file.Define all items for that namespace in your new
customs.yml
.
4. Referencing Namespaced Items
When giving or scripting items, use the format:
Example:
weapons magic_wand
If you omit the namespace and haven’t set a default, CoreItems will fall back to your configured default namespace.
5. Default Namespace
Controlled by
namespaces.default-namespace
inconfig.yml
.If a user runs
/coreitems give diamond_sword
, CoreItems interprets it as:
6. In-Game GUI Integration
Running
/coreitems menu
opens the Namespace Selection screen.Each namespace appears as an icon (folder or custom head) with its name.
Clicking a namespace icon loads that namespace’s item list (paginated).
7. Tips & Best Practices
Naming: Use clear, lowercase folder names (e.g.,
weapons
, notMyWeapons
).Consistency: Keep related items together—don’t mix armor and tools in one namespace.
Version Control: Commit each namespace folder independently so you can roll back changes per group.
Next Steps
Proceed to Commands & Permissions if you need to script item distribution, or dive into GUI System to customize how namespaces and items display in-game.
Last updated