-
Notifications
You must be signed in to change notification settings - Fork 197
GUIs
In game GUI's are a great way for your users to view information about their faction in a more interactive way, thats why we have revamped how we handle GUI's so it's more robust and user friendly. Currently you may use the GUI with Faction Warps and Permissions.
A Faction GUI is can be composed of two items:
- Globals
- Dummies
Globals can be defined as 'base' items that then can be actioned upon, for example I may define a relation
item that I then might use in the permissions interface. Parts of these may also be overridden when used, for example I may change the material for a specific relation, but the name stays the same. You may also use Faction placeholders (defined at end of config.yml) and PAPI placeholders.
they may also have states which depending on the user state it will affect.
- Permissions:
undefined
,allow
,deny
. - Warps:
password
,exist
,non_exist
Example globals section:
gui:
global:
relation:
material: WOODEN_SWORD
name: '&8[{relation-color}{relation}&8]'
action:
material: TERRACOTTA
name: '&8[{action-access-color}{action}&8]'
states:
allow:
color: LIME
material: LIME_TERRACOTTA
deny:
color: RED
material: RED_TERRACOTTA
undefined:
color: CYAN
material: CYAN_TERRACOTTA
lore:
- '&8Access:'
- '&8[{action-access-color}{action-access}&8]'
- ''
- '&8Left click to &a&lAllow'
- '&8Right click to &c&lDeny'
- '&8Middle click to &lUndefine'
warp:
material: RED_STAINED_GLASS
color: RED
name: '&8[&7{warp}&8]'
states:
exist:
material: LIME_STAINED_GLASS
color: LIME
password:
material: BLACK_STAINED_GLASS
color: BLACK
lore:
- '&8Password Protected'
Note: Color is only necessary pre 1.13. Because of our Materials system you must use 1.13 names even if running 1.8
Dummies are items that don't serve any purpose than to just be there being 'pretty', for example I may place glass planes as a delimiter.
*There is an exception if a dummy is named back
and the interface has multiple sections it will act as a back button.
gui:
dummies:
glass:
material: BLACK_STAINED_GLASS_PANE
color: BLACK
name: ' '
relation-info:
material: STONE
name: '&8[{relation-color}{relation}&8]'
back:
material: ARROW
name: '&7Back'
This is the example GUI section as for reference, we highly recommend replacing your current section and working from there
fwarp-gui:
name: "Faction Warps"
rows: 3
password-timeout: 5
slots:
# '0' represents the number of the warp, 11 represents the position in the GUI (starting from 0)
'0': 11
'1': 12
'2': 13
'3': 14
'4': 15
items:
# '0' represents the number of the warp, warp represents the global item to base from
'0': warp
'1': warp
'2': warp
'3': warp
# you may also override values from the base like so
'4':
base: warp
material: STONE
dummies:
# '0' represents the slot, glass represents which dummy we are talking of
'0': glass
'1': glass
'2': glass
'3': glass
'4': glass
'5': glass
'6': glass
'7': glass
'8': glass