Pages Configuration

SettingsPlus allows you to create multiple pages for your settings menus. Each page must be stored inside the Pages folder and follow a specific layout. This layout ensures that the plugin can properly display and navigate between the pages.

Page Layout Structure

Below is the required structure for a settings page:

Inventory:
  size: 54
  name: "Your Settings - Page %page%"
  Page-Count: 1
  filler:
    material: BLACK_STAINED_GLASS_PANE
    displayName: " "
    amount: 1
    lore:
      - ""
  Next-Page:
    material: ARROW
    displayName: "&eNext Page"
    amount: 1
    lore:
      - "&7Left Click to go to next page"
  Previous-Page:
    material: ARROW
    displayName: "&ePrevious Page"
    amount: 1
    lore:
      - "&7Left Click to go to previous page"
  close:
    material: MAGMA_CREAM
    displayName: "&cClose"
    amount: 1
    lore:
      - "&7Left Click to close this page"
  goBack:
    material: PAPER
    displayName: "&eGo Back"
    amount: 1
    lore:
      - "&7Left Click to go back"
      - "&7to the main menu"
  Settings:
    id:

Explanation of Fields

1. Inventory

Defines the main configuration of the inventory interface:

  • size: The number of slots in the inventory. Valid values are multiples of 9 (e.g., 9, 18, 27, 54).

    • Example: 54

  • name: The name of the inventory, visible at the top. You can use placeholders like %page% to indicate the current page.

    • Example: "Your Settings - Page %page%"

  • Page-Count: The total number of pages this inventory contains.

    • Example: 1


2. Filler Slots

  • filler: Define the item used to fill empty slots in the inventory.

    • material: The item material. Example: BLACK_STAINED_GLASS_PANE

    • displayName: The name displayed for the filler item (usually blank). Example: " "

    • amount: The number of items in the filler stack. Example: 1

    • lore: A list of strings for the item's lore (usually empty). Example:

      lore:
        - ""

3. Navigation Buttons

  • Next-Page: Defines the button used to navigate to the next page.

    • Example:

      Next-Page:
        material: ARROW
        displayName: "&eNext Page"
        amount: 1
        lore:
          - "&7Left Click to go to next page"
  • Previous-Page: Defines the button used to navigate to the previous page.

    • Example:

      Previous-Page:
        material: ARROW
        displayName: "&ePrevious Page"
        amount: 1
        lore:
          - "&7Left Click to go to previous page"
  • close: Defines the button used to close the inventory.

    • Example:

      close:
        material: MAGMA_CREAM
        displayName: "&cClose"
        amount: 1
        lore:
          - "&7Left Click to close this page"
  • goBack: Defines the button used to return to the main menu.

    • Example:

      goBack:
        material: PAPER
        displayName: "&eGo Back"
        amount: 1
        lore:
          - "&7Left Click to go back"
          - "&7to the main menu"

4. Settings

The Settings section is where you define your custom options for this page. The id field serves as a placeholder for unique identifiers. Each setting added here must reference a valid configuration or custom logic.


Adding Multiple Pages

To create multiple pages:

  1. Create separate YAML files for each page inside the Pages folder. Example:

    Pages
    ├── page1.yml
    ├── page2.yml
    └── page3.yml
  2. Ensure each page file follows the required layout shown above.

  3. Use Page-Count and the navigation buttons (Next-Page, Previous-Page) to enable seamless navigation between pages.

Last updated