How to show the keys in a GUI?[edit | edit source]
You will need to Shift + Right-click a few times in any GUI (requires the permission songoda.admin) until a chat prompt appears, saying that the keys are now shown. Once you have correctly done this step, you will now have access to view the keys in the GUI. Keys are displayed in purple text directly below the name of the item, in the lore section when you hover over an item in the GUI.
How to view GUI keys
How to generate the GUI file?[edit | edit source]
You will need to run any command that opens a GUI (Example: "/uf leaderboard"). After running the command, a new folder will be generated in the main folder for that plugin called "GUI" that will hold a file for each GUI that is customizable after you open the GUI at least once in-game.
How to generate the GUI file in-game
Different aspects of the file[edit | edit source]
Key Type
|
Description
|
File
|
Image
|
__DEFAULT__
|
This key is used to edit the background items in a GUI.
|
1 overrides:
2 __DEFAULT__:
3 item: RED_STAINED_GLASS_PANE
|
|
__ROWS__
|
This key gives the ability to add more rows to a GUI. (Max 6 rows in total)
|
1 overrides:
2 __ROWS__: 6
|
|
mirrorfill_<number>
|
This key is used for all mirrorfills (glass around the border of the GUI). This key requires a special syntax to edit.
"mirrorcol:" This option will change all the mirrorfills with that key in the column.
"mirrorrow:" This option will change all the mirrorfills with that key in the row.
|
1 overrides:
2 mirrorfill_1:
3 item: ORANGE_STAINED_GLASS_PANE
4 mirrorcol: true
5 mirrorrow: true
|
|
custom_<name>
|
This key will allow you to add custom items to the GUI. To add custom items, you must start the key with custom_
|
1 overrides:
2 custom_leaderboard_information:
3 item: PAPER
4 row: 0
5 col: 3
6 title: '&6Title'
7 lore:
8 - ''
9 - '&eThis gui is meant'
10 - '&eto show the leaderboard'
11 - '&eabout player fishing'
Different syntax
Note: Both formats above and below will work. The only difference between them is how the position of the item in the GUI is specified. The first one uses the "row" and "col" variables to specify the position of the item in the GUI, while the second one uses the position "position" variable.
1 overrides:
2 custom_leaderboard_information:
3 item: PAPER
4 position: 3
5 title: '&6Title'
6 lore:
7 - ''
8 - '&eThis gui is meant'
9 - '&eto show the leaderboard'
10 - '&eabout player fishing'
|
|
<key>
|
This is for any keys that you see in the GUI.In the example below, the item in the GUI with the "weight" key is being edited.
|
1 overrides:
2 weight:
3 item: SIGN
4 row: 5
5 col: 4
|
|
How to use the disable function[edit | edit source]
In this section of the file, you can disable keys. When a key is disabled, all items in the GUI with that key will be removed.
1 disabled:
2 - disablekey1
3 - disablekey2
4 - disablekey3
How to define the slot position in GUIs[edit | edit source]
There are two ways to define the position of and item in the GUI.
The first way is by using the position variable.
The second way is by using the row and col variables.
Using postion
The position variable starts at 0 in the top left corner of GUI.
Below is a small example of code, where the black wool will be placed in the top left corner of the GUI.
1 overrides:
2 custom_code_example_postion:
3 item: BLACK_WOOL
4 position: 0
Using row and col
The row variable is used to define the row in GUI. In a GUI with 54 slots, the top row will be 0 while the bottom row will be 5.
The col variable is used to define the column in the GUI. In every GUI, the columns go from left to right, with the far left column being 0, and the far right column being 8.
Below is a small example of code, where the black wool will be placed in the first row and column of the GUI. So, in the top left corner of the GUI.
1 overrides:
2 custom_code_example_row_and_col:
3 item: BLACK_WOOL
4 row: 0
5 col: 0
Some examples of how you can customize GUIs[edit | edit source]
In this section, you can find a few examples of what you can do with customization.
Example 1
This example is a simple remodel of the sell GUI in the plugin UltimateFishing (/uf sell).
1 disabled:
2 - mirrorfill_1
3 - mirrorfill_2
4 - mirrorfill_3
5
6 overrides:
7 __DEFAULT__:
8 item: RED_STAINED_GLASS_PANE
9
10 prices:
11 item: BOOK
12 row: 0
13 col: 1
14
15 accessbaitshop:
16 item: STRING
17 row: 0
18 col: 7
19
20 sellfor:
21 item: SUNFLOWER
22 position: 4
Example 2
This example is a remodel of the bait shop GUI from the plugin UltimateFishing (/uf baitshop). Some items were added to the GUI to give players some information about the different bait types.
1 disabled: []
2
3 overrides:
4 __DEFAULT__:
5 item: RED_STAINED_GLASS_PANE
6
7 mirrorfill_1:
8 item: ORANGE_STAINED_GLASS_PANE
9 mirrorrow: true
10 mirrorcol: true
11
12 custom_information_about_bait:
13 item: SIGN
14 row: 0
15 col: 0
16 title: '&bBait information'
17 lore:
18 - Bait can be applied
19 - when you drag bait
20 - on a fish rod
21
22 custom_worms_bait:
23 item: PAPER
24 row: 2
25 col: 1
26 title: '&bWorms bait information'
27 lore:
28 - '&eBonus chance: &c100'
29 - '&eUses: &c3'
30 - '&eTarget: &cTiny and Normal'
31
32 custom_ultra_worms_bait:
33 item: PAPER
34 row: 2
35 col: 2
36 title: '&bUltra worms bait information'
37 lore:
38 - '&eBonus chance: &c25'
39 - '&eCritical change: &c20'
40 - '&eUses: &c3'
41 - '&eTarget: &cHuge'
42
43 custom_super_worms_bait:
44 item: PAPER
45 row: 2
46 col: 3
47 title: '&bSuper worms bait information'
48 lore:
49 - '&eBonus chance: &c15'
50 - '&eCritical change: &c15'
51 - '&eUses: &c3'
52 - '&eTarget: &cLarge'
Example 3
This example is a remodel of the leaderboard GUI in the plugin UltimateFishing (/uf leaderboard).
1 disabled:
2 - mirrorfill_2
3
4 overrides:
5 __DEFAULT__:
6 item: LIME_STAINED_GLASS_PANE
7
8 weight:
9 item: COMPASS
10
11 mirrorfill_1:
12 item: GREEN_STAINED_GLASS_PANE
13 mirrorrow: true
14 mirrorcol: true
15
16 mirrorfill_3:
17 item: GREEN_STAINED_GLASS_PANE
18 mirrorrow: true
19 mirrorcol: true
20
21 mirrorfill_4:
22 item: GREEN_STAINED_GLASS_PANE
23 mirrorrow: true
24 mirrorcol: true
25
26 mirrorfill_5:
27 item: GREEN_STAINED_GLASS_PANE
28 mirrorrow: true
29 mirrorcol: true
30
31 custom_fill_1:
32 item: GREEN_STAINED_GLASS_PANE
33 row: 0
34 col: 3
35
36 custom_fill_2:
37 item: GREEN_STAINED_GLASS_PANE
38 row: 0
39 col: 5
40
41 custom_fill_3:
42 item: GREEN_STAINED_GLASS_PANE
43 row: 2
44 col: 0
45
46 custom_fill_4:
47 item: GREEN_STAINED_GLASS_PANE
48 row: 2
49 col: 8
50
51 custom_fill_5:
52 item: GREEN_STAINED_GLASS_PANE
53 row: 3
54 col: 0
55
56 custom_fill_6:
57 item: GREEN_STAINED_GLASS_PANE
58 row: 3
59 col: 8
60
61 custom_fill_7:
62 item: GREEN_STAINED_GLASS_PANE
63 row: 5
64 col: 3
65
66 custom_fill_8:
67 item: GREEN_STAINED_GLASS_PANE
68 row: 5
69 col: 4
70
71 custom_fill_9:
72 item: GREEN_STAINED_GLASS_PANE
73 row: 5
74 col: 5
Frequently Asked Questions[edit | edit source]
Default gui file
Here, is the default file when you type the command for the first time.
1 # All keys on this list will be disabled. You can add any items key here
2 # if you no longer want that item in the GUI.
3 disabled:
4 - example3
5 - example4
6 - example5
7
8 #
9 # For information on how to apply overrides please visit
10 # https://wiki.songoda.com/Gui
11 #
12 overrides:
13
14 #
15 # This is just an example and does not override to any items
16 # in this GUI.
17 #
18 example:
19
20 # This is the icon material you would like to replace
21 # the current material with.
22 item: STONE
23
24 # This is the current position of the icon you would like to move.
25 # The number represents the cell the icon currently resides in.
26 position: 5
Why are my changes are not shown in the GUI?
Please note that some customizations to a GUI file will require a server restart to be applied.