Custom GUI - No-Not-Jaden/NotBounties GitHub Wiki
The GUI is completely customizable in the gui.yml file.
Scrolling down past the custom-items
config section, there will be config sections for GUI names like bounty-gui
or select-price
. There are a variety of options to change how these GUIs function.
When players are being represented in the GUI, their heads will be displayed. The order of these heads depends on the sort type. sort-type
accepts either numbers 0-3 for the bounty gui or 1-4 for everything else.
sort-type: 2
The bounty GUI will sort the players by their bounties. This only applies to the bounty-gui
GUI.
- [0] Newer bounties at top
- [1] Older bounties at top
- [2] More expensive bounties at top
- [3] Less expensive bounties at top
The leaderboard
GUI sorts by the value of the statistic the leaderboard is comparing. Changing this sort type will change it for all of the leaderboards.
- [1] Highest value at top
- [2] Older bounties at top
- [3] Alphabetically 'A' at top
- [4] Reverse alphabetically 'Z' at top
The other GUIs sort the same way as the leaderboard GUI but by immunity. These GUIs include set-bounty
and set-whitelist
. The remaining GUIs not listed do not display enough players for them to be sorted.
- [1] Highest value at top
- [2] Older bounties at top
- [3] Alphabetically 'A' at top
- [4] Reverse alphabetically 'Z' at top
The size
option refers to how many slots are in your GUI. A regular chest has 27 slots, and a double chest has 54 slots. Multiples of 9 look the best.
size: 54
The gui-name
option refers to the title of the inventory that is opened. It will display at the top of the GUI. The example below uses Page in the name because of the next option add-page
.
gui-name: '&d&lBounties &9&lPage'
The add-page
option refers to adding a page number to the title of the GUI. This is useful for servers with a lot of people. Alternatively, {page}
and {page_max}
can be used in the name to display the current page and maximum page.
add-page: true
The remove-page-items
option refers to removing the next or back buttons from the GUI if there is no next page or previous page. The GUI will auto-detect any custom items that have [back]
or [next]
in their commands. Keep this option on false for the select-price GUI.
remove-page-items: true
The player-slots
option refers to the slot numbers that player heads can show up in. This is a list of numbers. A range of numbers can be used to. For example, 13
will only include slot 13, and 2-19
will include all of the slots between 2 and 19 inclusive.
player-slots:
- '0-44'
- '46'
The head-name
option refers to the name of the player head items in the GUI. {amount}
and {player}
will be replaced with their respective values. The amount uses the value that the GUI sorts with.
head-name: '&4☠ &c&l{player} &4☠'
The head-lore
option refers to the lore of the player head items in the GUI. This uses a list. {amount}
and {player}
will be replaced with their respective values. The amount uses the value that the GUI sorts with.
head-lore:
- '&7<&m &7>'
- '&4Bounty: &6{amount}'
- '&4&oKill this player to'
- '&4&oreceive this reward'
- '&7<&m &7>'
The layout
option is where all of the custom items are used. For each new custom item, add a new section. The example uses numbers, but any text can be used. Under this, add 2 new options called item
and slot
. The item is the identifier for the custom item, and the slot corresponds to the position in the GUI. For a more detailed explanation, look at Using Custom Items.
All custom items in the GUI must be created in the custom-items
configuration section at the top of the gui.yml file.
To create an item, make a new section under custom-items
. You can name it however you want. You'll need to reference this name later. Next, add another subsection called material: <Material>
. Replace with the type of item you want. A list of item types can be found here.
identifier:
material: STONE
You can modify other aspects of the custom item than just the type.
amount: <#>
is the amount of items
custom-model-data: <#>
will attach custom model data to an item. This is useful for resource packs.
name: <text>
will change the display name of the item. If you are using this custom item in the price-select or a confirmation GUI, you can use the following placeholders:
-
{amount}
will be replaced with the value you are sorting by in the GUI. -
{tax}
will be replaced with the bounty tax. -
{amount_tax}
will be replaced with {amount} * bounty tax. -
{player1}
will be replaced with the current player in the GUI.
In all GUIs, you can use PlaceholderAPI placeholders.
lore: [list]
will change the lore of the item. The replacements work the same as the name.
enchanted: <true/false>
will make the item enchanted.
color: <color>
will change the color of the item if possible. For example, changing the color of a potion, leather armor, or the tip of a tipped arrow. Replace <color>
with hex (#RRGGBB
), RGB (R G B
or R,G,B
), or a color name from this list
hide-nbt: <true/false>
will hide NBT data from being shown on the item.
hide-tooltip: <true/false>
will hide everything when hovering over the item. No item name, no lore, not even an empty box. Minecraft version must be 1.20.5 or later.
Commands can be used as actions for a custom item when it is clicked. {player}
will be replaced by the player who clicked the item.
custom-items:
example-item:
material: STONE
commands:
- 'say This stone was clicked by {player}!'
There are additional actions that can be used in the commands. See Action Commands for more information on these actions.
Custom heads can be used in custom items. The data for the custom head will be in the material with the format: material: player_head <data>
. This data can either be a HeadDataBase ID if HDB is installed, or base64 can be used.
Custom items are used in the layout
section in every GUI configuration. To use a custom item that you've created, make a new section under layout
. This section can be named anything. Under the section you just created, create 2 options called item
and slot
. The layout should look like this so far.
layout:
anything:
item:
slot:
If you have an program that shows you errors, you should be getting one right now. That is because there is nothing in the item
and slot
sections. To fix this, add the identifier of the custom item you created after item:
, and add the slot number you want this item after slot:
. The slot can be a single number, a range of numbers, or a list with a combination of those two. slot: 23
will only display the item in slot 23. slot: 1-3
will display the item in slots 1, 2, and 3. This next example will display the item in slots 1, 3, 5, and slots 7-9.
slot:
- 1
- 3
- 5
- 7-9
Here is an example of the set-whitelist
GUI's layout
layout:
1:
item: fill
slot: 45-53
2:
item: return
slot: 49
3:
item: next
slot: 53
4:
item: back
slot: 45
5:
item: add-offline
slot: 51
6:
item: reset-whitelist
slot: 47
To create a new GUI, create a new configuration section in the gui.yml file. You can name this anything. The name of it will be used to open it. You can include any of the GUI options that are present in other GUIs.
The only way to get to a custom GUI is with a custom item in a default GUI. This custom item must have the command: [gui] <GUI Identifier>
. The identifier is the name of the configuration section you created at the start. Put this custom item in one of the default GUI's layouts. Now when you click the custom item, it will bring you to your custom GUI. If you need help creating a custom item or adding a custom item to a layout, see Creating Custom Items or Using Custom Items.