Themes
The GriefPrevention GUI Addon supports customizable themes to enhance the visual appearance of GUIs. Themes are defined in individual YAML files located in the theme folder, with names matching the theme specified in the GUI’s data
section, appended with _EN.yml
(e.g., default
uses default_EN.yml
). Themes are loaded first during GUI initialization, with items set to a high priority (e.g., 5
), allowing GUI items with lower priority to override them.
Theme Configuration
File Naming: Theme files must be named
<theme_name>_EN.yml
(e.g.,default_EN.yml
,nature_EN.yml
) and placed in the theme folder.Structure: Each theme file contains an
items
section defining decorative items (e.g., glass panes, grass) that fill specific slots in the GUI.Priority: Theme items are assigned a high priority (e.g.,
5
) so that GUI items with lower priority (e.g.,1
,2
) can replace them in overlapping slots.Application: The theme is specified in the GUI’s
data
section via thetheme
field (e.g.,theme: clean_4
forClaimUpgradeNoEnter_EN.yml
).Custom Themes: Admins can create custom themes by adding new
<theme_name>_EN.yml
files and specifying the theme name in the GUI’sdata
section.
Default Themes
The GriefPrevention GUI Addon includes the following default themes:
default (
default_EN.yml
):Uses black stained glass panes to create a dark border around the GUI.
Configuration:
nature (
nature_EN.yml
):Uses a mix of glass panes, grass, and plants for a natural, outdoor aesthetic.
Configuration:
clean (
clean_EN.yml
):Uses air (
AIR
) to create a minimalistic, transparent background for standard-sized GUIs.Configuration:
clean_4 (
clean_4_EN.yml
):A specialized version of the
clean
theme designed for the smallerClaimUpgradeNoEnter
GUI (4 rows), using air (AIR
) for a transparent background.Configuration:
Theme Loading and Priority
Loading Process: Themes are loaded first when a GUI is initialized, populating the specified slots with theme items (e.g., glass panes, air) at priority
5
.Item Override: GUI items with a lower priority (e.g.,
1
or2
) override theme items in the same slots. For example, inClaimUpgradeBiomeSelector_EN.yml
, thegoback
item (priority2
, slot45
) will replace adefault
theme’sBACKGROUND_2
item (priority5
, slot45
).Customization: Admins can create custom themes by adding new
<theme_name>_EN.yml
files in the theme folder and referencing them in the GUI’sdata
section (e.g.,theme: my_custom_theme
).
Last updated