TerraByteDev Wiki

Paginated GUIs

Guide for paginated GUIs.

Certain GUIs in SkyFactions are paginated, meaning you can move between "pages" of content.
This includes but is not limited to faction invites, join requests and member management.

The items used in paginations can be customised in the <lang_folder>/guis/pagination.yml configuration file.

Pagination Config

# DO NOT CHANGE THIS!!!!
config-version: 1
 
# This is a special configuration file.
# This is the configuration for all the items related to pagination.
 
items:
  # Button to move to next page along the paginated GUI.
  forward-button:
    char: ">" # This is the character used in the layout.
    material: "PLAYER_HEAD"
    # You can set custom skull textures (e.g. from minecraft-heads.com). 'material' MUST BE SET TO 'PLAYER_HEAD'. Placeholders: <player_skull> - Skull texture of the player.
    skull: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTYzMzlmZjJlNTM0MmJhMThiZGM0OGE5OWNjYTY1ZDEyM2NlNzgxZDg3ODI3MmY5ZDk2NGVhZDNiOGFkMzcwIn19fQ==" #
    name: "<green><bold>Next Page" # Name of the item.
    sound: "item.book.page_turn" # Sound played when the item is clicked. Set to 'none' to disable.
    pitch: 1 # Pitch of the sound. Does not apply if 'sound' is 'none.'.
 
    # Lore of the item when there are more pages.
    # Placeholders: <next-page> - Number of the next page / <total-pages> - Total number of pages.
    # Only supports one lore line.
    more-pages-lore: "<green>Go to page <yellow><next-page> <green>/<yellow> <total-pages>"
 
    # Lore of the item when there are no more pages.
    # Only supports one lore line.
    no-pages-lore: "<red>There are no more pages!"
 
 
  # Button to move to previous pages along the paginated GUI.
  back-button:
    char: "<"
    material: "PLAYER_HEAD"
    skull: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjg0ZjU5NzEzMWJiZTI1ZGMwNThhZjg4OGNiMjk4MzFmNzk1OTliYzY3Yzk1YzgwMjkyNWNlNGFmYmEzMzJmYyJ9fX0="
    name: "<red><bold>Previous"
    sound: "item.book.page_turn"
    pitch: 1
 
    # Lore of the item when there are more pages.
    # Placeholders: <next-page> - Number of the next page / <total-pages> - Total number of pages.
    # Only supports one lore line.
    more-pages-lore: "<green>Go to page <yellow><next-page> <green>/<yellow> <total-pages>"
 
    # Lore of the item when there are no more pages.
    # Only supports one lore line.
    no-pages-lore: "<red>You cannot go further back!"

This allows you to configure the items used in paginated GUIs, using a similar format to normal items with additional fields.
You can configure the appearance of the actual items that appear in the specific GUI's pagination area in that corresponding's GUI's item configuration section.

In a normal paginated GUI, the paginated content would look like:

# This is the item that displays each incoming join request.
# By default, the item is the player's head, and you shouldn't change this unless you're... insane?
# You can customise the text, lore and sound though.
model:
  material: "PLAYER_HEAD"
  skull: "<player_skull>"
  text: "<blue><player_name>" # Placeholders: <player_name> - Name of player.
  sound: "" # The obelisk UI by default is set to make a sound. Don't want to trigger it twice.
  pitch: 1
  # Placeholders: <player_name> - Name of player / <timestamp> - Timestamp of the join request.
  lore:
    - "<green><player_name><yellow> wants to"
    - "<yellow>join your faction."
    - ""
    - "<gray><timestamp> ago"

This uses the same item format as normal items.
Unlike other items, you cannot customise the character that this is mapped to in the layout, and it will always be x.

On this page