Grief Prevention GUI Addon
  • Getting Started
    • Welcome
    • Plugin Information
  • Getting Started
  • Placeholders
  • GUI SYSTEM
    • GUI Overview
  • Themes
  • Available GUIs
  • Custom User-Defined GUIs
  • GUI Configuration Files
  • GUI Settings in config.yml
  • Usage Notes and Troubleshooting
  • Flag System
    • Flag Overview
    • Built-in Flags
    • Configuration Files
    • GPFlags Integration
    • Usage Notes and Troubleshooting
  • GUI System
Powered by GitBook
On this page
  1. Flag System

Configuration Files

FlagDefaults.yml

  • Purpose: Allows setting the default state (enabled) and default arguments for flags.

  • Structure:

    • Each flag is listed by its case-sensitive name (matching FlagOptions.yml).

    • enabled: Sets whether the flag is active by default (e.g., false for EnterMessage).

    • argument: Specifies the default argument (e.g., a default message for EnterMessage).

  • Example:

    EnterMessage:
      enabled: false
      argument: "You are now entering %gpextension_getbyid_claimname_{claimid}%"
  • Notes: Flags not listed in FlagDefaults.yml are disabled by default with no default argument.

FlagOptions.yml

  • Purpose: Defines the properties and functionality of each flag for GUI display.

  • Key Fields:

    • enable: Determines if the flag is available in the GUI (true/false).

    • material: The item representing the flag in the GUI (e.g., OAK_SIGN for EnterMessage).

    • permission: Sets permissions for activation (activate) and usage (usage), defaulting to NONE.

    • order: Specifies the flag’s position in the GUI (e.g., 1 for EnterMessage, 2 for ExitMessage).

    • lore: Descriptive text shown in the GUI, including placeholders for status and arguments.

    • owner_only: Restricts flag usage to claim owners (set to false for all flags).

    • requires_argument: Indicates if the flag needs an argument (e.g., true for EnterMessage, false for NoElytra).

    • special: Additional notes (e.g., instructions for ClaimWarp).

    • custom_left_click_commands / custom_right_click_commands: Commands to run on click (e.g., opening a GUI for ClaimIcon).

    • only_run_custom_commands: If true, the flag only runs custom commands and does not enable them by default.

    • only_run_custom_commands_on_disabled / only_run_custom_commands_on_enabled: Restricts command execution based on flag state.

  • Notes: All built-in flags are enabled (enable: true) and have no permission requirements by default.

flagsettings.yml

  • Purpose: Contains additional settings for specific flags, primarily ClaimFly, and general restrictions.

  • Key Sections:

    • Restrictions:

      • NewManagerFlagRestrictions: Enables a cooldown for new managers (default: 1 hour).

      • HideFlagsNoPermission: If enabled, hides flags from the GUI if the player lacks activation permission (default: false).

    • Fly Settings (for ClaimFly):

      • timedFlight: Configures timed flight duration (default: disabled, initial value 1 minute).

      • particleEffects: Enables/disables visual effects for flying (default: true).

      • permissionSettings: Optional permission checks for flight (default: no permission required).

      • flagRestrictions: Controls flight in restricted claims, with bypass options for owners/managers.

      • consoleWarnings: Suppresses warnings if ClaimFly is not disabled with bypass permissions.

      messages: Configures entry/exit message display (e.g., title mode, default: false).

  • Notes: Most settings are specific to ClaimFly, but restrictions apply globally.

PreviousBuilt-in FlagsNextGPFlags Integration

Last updated 1 month ago