Pages » Fcore » Features » Gui
FCore provides you an ability to maximize the customization of every plugin aspect including GUIs.
There are some tips and features you can use to provide a bit customization for your GUIs and redefine the plugin style.
All GUI items have PlaceholderAPI support in name and lore!
Custom Content
You can also make those items usable by adding one of the following types. Some plugins can provide their own item types for GUIs, so it's listed on that plugins wiki.
- NONE - Static item, no actions on click. Used by default when no type specified.
- EXIT - Closes GUI on click.
- RETURN - Returns to the plugin parent/previous GUI if there is any.
- NEXT - Opens next page on click if possible.
- BACK - Opens previous page on click if possible.
- ACCEPT - Confirms certain certain action.
- DECLINE - Declines certain plugin action.
Examples:
title: 'Sample GUI'
size: 27
# Here is where custom content starts.
# For item meta options see HERE.
content:
# Custom unique item id.
filler:
# Item meta options.
material: BLACK_STAINED_GLASS_PANE
name: '&7'
# Item positions in GUI.
slots: 0,1,2,3,4,5,6,7,8,9,17,18,19,20,21,23,24,25,26
return:
material: 'BARRIER'
name: '&cReturn'
slots: 22
# GUI Item type.
type: RETURN
Custom Click Actions
Please check the Custom Actions page for details.
Allowed click types:
- LEFT - Left Click.
- RIGHT - Right Click.
- SHIFT_LEFT - Shift+Left Click.
- SHIFT_RIGHT - Shift+Right Click.
- MIDDLE - Middle Click.
Examples:
title: 'Sample GUI'
size: 27
# GUI Items.
content:
sample-diamond:
material: 'DIAMOND'
name: '&bClick Me!'
# Here starts your custom actions for certain clicks.
# You can provide multiple action sections for each click.
custom-actions:
# Click type.
LEFT:
# Your custom unique name for actions section.
actions-name:
target-selectors:
- '[SELF] ~name: self;'
conditions:
list: []
actions-on-fail: 'null'
action-executors:
- '[COMMAND_CONSOLE] ~message: tell %player% Hello!; ~target: self;'
slots: 10
Frame Animations
There are some item placeholders that may help you in animation creation:
- %GLOBAL% - Replaced with the main item name/lore.
Examples:
title: 'Sample GUI'
size: 27
# General animation settings.
animation:
# GUI update interval in ticks (20 ticks = 1 second). 0 will disable animations.
tick: 18
# Defines if item frames must wait until the most greater frame of all items is reached before animation loop can start again.
progressive: false
content:
blocks:
# This item won't even be displayed due to animation frames, but we use it to define name and lore.
material: DIAMOND
name: '&l&nAnimated Item'
lore:
- '&7Some animated item.'
# Item animation settings.
animation:
# Defines if animation will be played automatically.
auto-play: true
# Defines the animation start frame.
start-frame: 0
# Animations in this example will only change the item name color and material.
# Please note, that these item settings will replace settings of the main item!
# Use placeholders above to save certain item data without copy-pasting it.
animation-frames:
# Frame number. You can skip some numbers especially when using 'progressive' option.
# So if you want to make item animation async, you can lower the GUI animation interval and skip some frames here.
# Example: GUI animation interval is 1 tick, you want item A update every 5 ticks, item B every 7 ticks, so for item A there will be two 0 and 5 frames, for item B - 0 and 7.
'0':
material: BIRCH_LOG
name: '&f%GLOBAL%'
lore:
- '%GLOBAL%'
'1':
material: CUT_SANDSTONE
name: '&e%GLOBAL%'
lore:
- '%GLOBAL%'
'2':
material: NETHERRACK
name: '&c%GLOBAL%'
lore:
- '%GLOBAL%'
'3':
material: LIME_TERRACOTTA
name: '&a%GLOBAL%'
lore:
- '%GLOBAL%'
'4':
material: ICE
name: '&b%GLOBAL%'
lore:
- '%GLOBAL%'
slots: 10
Information
Empty Block