-
Notifications
You must be signed in to change notification settings - Fork 0
GUI For Server Admins
This section is dedicated to server admins. If you are looking for the developers' page, click here
Many of the fields referenced on this page might be or require platform-specific values. Check the glossary
GUIs are the main focus and the reason why this library has been created. They are graphical interfaces that can be manipulated via the configuration file to display proper content to the user. While there are different types of GUIs, most of them are similar and can be interchanged.
In this section, we will first look over the common options, then we will take a deeper look to the various types and their advantages.
Table of Contents |
---|
Contents |
Title |
Size |
Movable Slots |
Variables |
Actions |
Types |
The main thing that one might be interested in is adding content in the GUI. Contents are elements on the page that can be interacted with and will display information to the viewer.
Since GUIs are divided in slots, for each, one or more content can be indicated. This is possible to allow fallback objects to show in case certain conditions are not met. So, for example, to add two contents on slot 0, it is possible to use a list:
gui:
contents:
'0':
# First
- item: {}
priority: 0
type: ITEM
# Second
- item: {}
priority: 0
type: ITEM
There is a full guide dedicated to contents that is highly advised to better understand how to properly configure this section.
As the name suggests, the title is the name that will appear on top of the GUI. Colored names with the & character can be used.
gui:
title: "&cSuper GUI"
The size of the GUI is responsible for the number of slots in the page. Except for certain cases, this number has to be a multiple of 9 and not higher than 54.
gui:
size: 45
By default, each content added to the GUI will not be movable. This means that, upon interacting, the viewer will not be able to pick up the item and move it around. This behavior can be changed by specifying for which contents in the slots this should be allowed.
gui:
movable-slots:
- 3
- 7
NOTE: this description only applies when first showing the GUI. Moving a movable object from a movable slot to a non-movable one, will not make it non-movable.