Basic How-To Get Started (Wiki Coming Soon)
- Drag and drop HavenCore.jar into your "plugins" folder and restart the server.
- Create new .yml file inside the newly generated path "plugins/HavenCore/items/" to add new items inside.
- Add your custom item by assigning an ID, base material, display name and optional lore. Something like the example below:
-
- LuckyPickaxe:
- display name: "&bLucky Pickaxe"
- material: STONE_PICKAXE
- mechanisms:
- lore:
- - "&7An extremely lucky"
- - "&7pickaxe."
- (Optional) Add custom_model_data mechanism to load resource pack predicate items.
Custom Emojis
Emojis are added by using a custom bitmap image in your fonts.json of your resource pack, we've made it easy to add emojis in. Just simply put them in the emojis.json file in your config, for example:
{
"myemoji": "E001"
}
Our plugin will automatically correspond when written in chat as ":myemoji:" with a colon being the default emoji prefix & suffix and automatically replace it with "\uE001" which will show your new emoji.
Understanding Custom GUI Mechanics
Now a big feature of this is the ability to use custom GUIs, now there are 2 methods available within the plugin.
1) GUI Item Slot (The GUI is an item with a negative Z axis to overlay the inventory)
2) Custom Font Bitmap (The GUI is a bitmap image assigned to a font and uses negative spacing to pad it.)
Now GUIs are made up of one key component, GUI_ICONS which are the item type for any item or element of a GUI, for example:
Code (YAML):
MyGUIIcon:
type
: GUI_ICON
display name
:
"&bHello World!"
lore
:
"&7This is a GUI button."
Now this can be used to create a new GUI item which is the actual GUI itself processed by the plugin, for example:
Code (YAML):
AnotherGUI:
title
:
"Another GUI"
type
: GUI
item
: myguiicon
material
: GLASS_PANE
mechanisms:
custom_model_data
: 55
display name
:
" "
slot
: 26
size
: 27
items:
MyGUIIcon:
slot
: 0
MainGUI:
title
:
"My GUI"
type
: GUI
item
: carrot
material
: GLASS_PANE
mechanisms:
custom_model_data
: 55
display name
:
" "
slot
: 26
size
: 27
items:
MyGUIIcon:
slot
: 0
Now a quick run down of what this is doing, both Main & Another are now GUIs in the game, the key is the "item" option under each, for example Main has carrot which if is not the name of a custom item will default to the material and now mean anytime you right click a carrot or custom item with the ID of carrot, it will automatically open the Main GUI. At the same time you can see that myguiicon is an item value as well, but myguiicon is never given or used as a player held object, but what this actually does is also links inventory clicking. So if you click myguiicon inside any gui it's listed in, for example Main GUI it will automatically then open the linked "AnotherGUI" as specified by it's item.
There are extra benefits, the slot value when listing items can also be a list of slot numbers for multiple placements of an item instead of just a single slot.