Skip to content

pagelayout.yml

goflishMC edited this page Jun 30, 2025 · 3 revisions

pagelayout.yml

This file defines the visual layout for shops with multiple pages. You can use it to reserve space for navigation buttons like Next, Previous, and Menu across paginated shops.


๐Ÿ“ File Location

/plugins/Genesis/pagelayout.yml

โš™๏ธ Options

ShowIfMultiplePagesOnly

ShowIfMultiplePagesOnly: true
  • If true, layout items (e.g., page buttons) are only shown when multiple pages are needed.
  • Set to false to always show layout items.

MaxRows

MaxRows: 6
  • The maximum number of GUI rows per shop before requiring pagination.
  • Range: 1 to 6.

ReservedSlotsStart

ReservedSlotsStart: 46
  • Slot index (0โ€“53) where layout buttons begin.
  • All slots from this number and above will be reserved, meaning shop items will not appear there.
  • These are used for layout controls like next/previous buttons.

๐Ÿ› ๏ธ Layout Items

Layout items are shop buttons (e.g., next page, menu) that are shown on every page that uses this layout.

items:
  Previous:
    RewardType: page
    Reward: previous
    PriceType: nothing
    MenuItem:
      - type:ARROW
      - amount:1
      - name:&f&lPrevious
      - 'lore:&7Go back to the previous page.'
    Message: ''
    InventoryLocation: 46
    ExtraPermission: ''
    Condition:
      - type:page
      - over:1

  Menu:
    RewardType: shop
    Reward: menu
    PriceType: nothing
    MenuItem:
      - type:CHEST
      - name:&9&l&nMenu
      - 'lore:&7Go back to the main Menu.'
    Message: ''
    InventoryLocation: 50
    ExtraPermission: ''

  Next:
    RewardType: page
    Reward: next
    PriceType: nothing
    MenuItem:
      - type:ARROW
      - amount:1
      - name:&f&lNext
      - 'lore:&7Open the next page.'
    Message: ''
    InventoryLocation: 54
    ExtraPermission: ''
    Condition:
      - type:page
      - under:%maxpage%

These items behave like regular shop items, including support for conditions and custom appearances.


๐Ÿ“ Notes

  • You can use %maxpage% and page conditions to control when navigation items appear.
  • The layout is only used when the number of shop items exceeds available slots, unless ShowIfMultiplePagesOnly is set to false.

Let me know if you want this linked under a new "Language & Display" group on the Home page.

Clone this wiki locally