Skip to content

Configurations

David Rodriguez edited this page Mar 14, 2024 · 16 revisions
config.yml
#======================================================================#
#                                                                      #
#  ██████╗ ██╗      █████╗ ██╗   ██╗███████╗██████╗                    #
#  ██╔══██╗██║     ██╔══██╗╚██╗ ██╔╝██╔════╝██╔══██╗                   #
#  ██████╔╝██║     ███████║ ╚████╔╝ █████╗  ██████╔╝                   #
#  ██╔═══╝ ██║     ██╔══██║  ╚██╔╝  ██╔══╝  ██╔══██╗                   #
#  ██║     ███████╗██║  ██║   ██║   ███████╗██║  ██║                   #
#  ╚═╝     ╚══════╝╚═╝  ╚═╝   ╚═╝   ╚══════╝╚═╝  ╚═╝                   #
#                                                                      #
#    ███████╗███████╗████████╗████████╗██╗███╗   ██╗ ██████╗ ███████╗  #
#    ██╔════╝██╔════╝╚══██╔══╝╚══██╔══╝██║████╗  ██║██╔════╝ ██╔════╝  #
#    ███████╗█████╗     ██║      ██║   ██║██╔██╗ ██║██║  ███╗███████╗  #
#    ╚════██║██╔══╝     ██║      ██║   ██║██║╚██╗██║██║   ██║╚════██║  #
#    ███████║███████╗   ██║      ██║   ██║██║ ╚████║╚██████╔╝███████║  #
#    ╚══════╝╚══════╝   ╚═╝      ╚═╝   ╚═╝╚═╝  ╚═══╝ ╚═════╝ ╚══════╝  #
#                                                                      #
#======================================================================#
#
# WARNING:
# The configuration files may change with new versions of the plugin. You will need to copy the
# changes over to your local files, or generate new configuration files.
#
# You can find the latest version of all the configuration files here:
# https://github.com/limbo56/PlayerSettings/wiki/Configurations
#

# General Configuration Section
general:
  debug: false
  # Toggles the collection of plugin usage metrics
  #
  # * Disabling this option does not affect plugin functionality
  # * Collected data is anonymous, providing server-related information
  metrics: true
  # Toggles the update message to server operators upon joining
  update-alert: true
  # Toggles the warning message logged when a security/authentication plugin is causing issues
  offline-warning: true
  # Time delay (in milliseconds) before saving player settings to the database
  #
  # * This delay helps prevent excessive database requests during rapid settings updates
  settings-save-delay: 500
  # Time delay (in milliseconds) before saving the flight state of a player to the database
  flight-state-save-delay: 600
  # List of worlds where the plugin will be enabled
  #
  # * Use '*' to enable the plugin in all worlds
  worlds:
    - "world"
  # List of metadata tags to treat as NPCs. This is used to ignore targets of the stacker setting
  #
  # * By default, the "Citizens" plugin adds the "NPC" metadata tag to all of its entities
  npc-metadata:
    - "NPC"
  # Map of aliases to use when displaying the value of a setting
  #
  # * Values can be mapped to an alias or a list of aliases
  # * The first alias in the list will be used to display the setting value
  # * The alias for value 0 will be used to display setting values less than 1
  value-aliases:
    0: [ "off", "x0" ]
    1: [ "on", "x1" ]
    2: "x2"
    3: "x3"
    4: "x4"
    5: "x5"
    6: "x6"
    7: "x7"
    8: "x8"
    9: "x9"
    10: "x10"

# Menu Configuration Section
menu:
  name: "&6&lSettings"
  size: 54
  # Enable displaying of the toggle button below settings
  toggle-button: true
  # Sounds played when a player interacts with a setting
  #
  # Format: [Sound], [Volume], [Pitch]
  #
  # Examples:
  # - ENTITY_PLAYER_BURP, 2.5f, 0.5
  # - ENTITY_PLAYER_BURP, 0.5, 1f
  # - MUSIC_END, 10f
  sounds:
    setting-toggle-on: "BLOCK_NOTE_BLOCK_HARP, 1, 1"
    setting-toggle-off: "BLOCK_NOTE_BLOCK_HARP, 1, -99"

# Commands configuration section
commands:
  # Default command that '/settings' will perform
  #
  # * By default, the command will execute the '/settings open' command
  #
  # Available Options:
  # - open : Opens the settings menu
  # - help : Send the settings help message
  default: "open"
  # The command executed when enabling a setting through the chat
  chat-enable: "playersettings:settings"
  open:
    enabled: true
  help:
    enabled: true
  reload:
    enabled: true
  set:
    enabled: true
  get:
    enabled: true

# Data Storage Configuration Section
storage:
  # The storage type to use when storing player settings
  #
  # Available options:
  # - sqlite (default)
  # - sql
  # - mongodb
  type: "sqlite"
  # The host address of the settings storage database
  #
  # Formats:
  # * (sqlite, sql)
  #   | [Host]:[Port]
  # * (mongodb)
  #   | mongodb://[User]:[Pass]@[Host]:[Port]/[Options]
  #   Recommended Options: maxPoolSize=20&w=majority&compressors=snappy
  #   References:
  #   - URI: https://www.mongodb.com/docs/drivers/java/sync/current/fundamentals/connection/connect/#connection-uri
  #   - Options: https://www.mongodb.com/docs/drivers/java/sync/current/fundamentals/connection/connection-options/
  host: "localhost:3306"
  # The name of the database/collection to store settings data in
  #
  # * The database/collection must already exist before running the plugin!
  database: "playersettings"
  # The credentials used to authenticate with the database and establish connections
  #
  # * IGNORED BY STORAGE TYPE "mongodb". Instead, specify your database credentials inside the "host" connection uri.
  username: "root"
  password: "root"
  # Connection Pool Configuration
  #
  # * IGNORED BY STORAGE TYPE "mongodb". Instead, specify your pool properties inside the "host" connection uri.
  pool:
    # Maximum number of connections to the database
    # https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing
    maximum-pool-size: 10
    # Minimum number of idle connections to maintain in the pool
    #
    # * For maximum performance and responsiveness to spike demands, we recommend not setting this
    #   value and instead allowing the pool to act as a fixed size connection pool
    #   (set this value to the same as 'maximum-pool-size')
    minimum-idle: 10
    # Maximum lifetime in milliseconds of a connection in the pool
    #
    # * We strongly recommend setting this value to at least 30 seconds shorter than any database
    #   or infrastructure imposed connection time limit
    max-lifetime: 1800000 # 30 minutes
    # Frequency of keep alive attempts to prevent connection timeouts
    #
    # * This value must be less than the 'max-lifetime' value
    # * Setting the value to zero will disable the keep alive functionality
    keep-alive-time: 0
    # Maximum time to wait for a connection from the pool before timing out in milliseconds
    connection-timeout: 5000 # 5 seconds
  # Connection Properties
  #
  # * IGNORED BY STORAGE TYPE "mongodb". Instead, specify your database properties inside the "host" connection uri.
  properties:
    use-unicode: true
    character-encoding: utf8
    use-ssl: false
    verify-server-certificate: false
messages.yml
# Empty quotes disable the message.
# Example:
# - prefix: ""
# - setting-changed: ""

# Prefix appended to every plugin message.
prefix: "&f&l(&6Settings&f&l) &f"

settings:
  no-access: "&cYou don't have permissions to change this setting"
  no-disable-access: "&cYou don't have permissions to disable this setting"
  # %setting% - The name of the setting the user tried to change
  # %max% - The maximum value this user can change the level of this setting to
  low-access-level: "&cPermission denied. You're limited to setting '%setting%&c' to a maximum of &e%max%&c."
  no-settings-data: "&cNo settings data found for your account"
  wait-loading: "&cPlease wait until your settings load before doing any changes"
  # NOTE: This message requires the '/settings set' command to be enabled
  # %setting% - The name of the setting that is disabled
  # %enableAction% - The clickable text to enable the setting
  self-disabled: "&cYou have the '%setting%&c' setting disabled! %enableAction%"
  enable-action: "&e(Click to enable)"
  # %setting% - The name of the setting that is disabled
  enable-action-tooltip:
  - "&6%setting%"
  - "&7Click to &aenable"

commands:
  help-header: "&e------- &6Settings Help &e---------"
  help-command-format: "&f/settings %command% &8: &7%description%"
  no-access: "&cYou don't have permissions to execute this command"
  # %setting% - The name of the setting the user tried to change
  setting-not-found: "&cUnknown setting '&6%setting%&c'!"
  # %values% - The list of accepted values for the setting that the player has permissions for
  setting-invalid-level: "&cInvalid setting level! The accepted levels are: &e%values%"
  # %setting% - The name of the setting that was changed
  # %value% - The value the setting was changed to
  setting-changed: "Setting '&6%setting%&f' has been set to &e%value%"
  setting-show: "&6%setting% &f- &e%value%"
  setting-unchanged: "&cSetting '&6%setting%&c' is already set to &e%value%"

stacker:
  target-disabled: "&cThat player has the '&6Stacker&c' setting disabled!"
  target-invalid-entity: "&cYou can't stack that entity!"
items.yml
# Display properties for items in the settings menu
#
# Each item in the menu is defined by a unique name or the name of the setting it represents.
# Below, you'll find the properties that describe how the item is displayed in the menu.
# You can also specify non-setting-related items using a similar pattern.
#
# Item configuration format:
#
# | A unique name to identify the setting that it's displaying
# example-setting:
#   * You can find all of the available properties for this section here:
#   * https://github.com/CryptoMorin/XSeries/wiki/XItemStack
#
#   | The display name of the item
#   | Placeholders:
#     - %current%  : Current value of the setting
#     - %max%      : Maximum value allowed for the setting
#     - %next%     : Next value of the setting
#     - %previous% : Previous value of the setting
#   name: "&aExample"
#
#   | The material of the item (https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html)
#   |
#   | Static format example:
#   |   material: "DIAMOND_SWORD"
#   |   material: "INK_SACK:10"
#   |
#   | Dynamic format example (not applicable for non-setting items):
#   |   material:
#   |     0: "WOODEN_SWORD"
#   |     1: "DIAMOND_SWORD"
#   material: "LIME_WOOL"
#
#   | The page of the menu where the item will appear
#   page: 1
#
#   | The slot of the menu in which the item will be placed
#   slot: 4
#
#   | The amount of the item to show in the stack
#   amount: 1
#
#   | Toggles the glow applied to the item when the setting is enabled
#   glow: true
#
#   | The texture URL to assign to the material if it's a player skull
#   | * Accepts usernames, texture URLs, and base64 encoded texture URLs
#   skull: "ewogICJ0aW1lc3RhbXAiIDogMTY2NjY1ODAwNzgxMiwKICAicHJvZmlsZUlkIiA6ICIwNjlhNzlmNDQ0ZTk0NzI2YTViZWZjYTkwZTM4YWFmNSIsCiAgInByb2ZpbGVOYW1lIiA6ICJOb3RjaCIsCiAgInRleHR1cmVzIiA6IHsKICAgICJTS0lOIiA6IHsKICAgICAgInVybCIgOiAiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8yOTIwMDlhNDkyNWI1OGYwMmM3N2RhZGMzZWNlZjA3ZWE0Yzc0NzJmNjRlMGZkYzMyY2U1NTIyNDg5MzYyNjgwIgogICAgfQogIH0KfQ=="
#
#   | The id of the custom item model to use for this item
#   | * Only works on versions 1.14+
#   |
#   | Dynamic format example (not applicable for non-setting items):
#   |   custom-model-data:
#   |     0: 8
#   |     1: 9
#   custom-model-data: 1
#
#   | A list of text that will be set as the lore of the item
#   | Placeholders:
#     - %current%  : Current value of the setting
#     - %max%      : Maximum value allowed for the setting
#     - %next%     : Next value of the setting
#     - %previous% : Previous value of the setting
#   lore:
#     - "&aExample lore"
#
# Examples:
#
# premium-setting:
#   name: '&dPremium &f%current%'
#   material: JUKEBOX
#   page: 1
#   slot: 34
#   amount: 1
#   lore:
#     - '&7Toggle your account as authenticated and skip the login step!'
#     - ''
#     - '&6Click &7to toggle'
#
# radio-setting:
#   name: '&dRadio &f%current%'
#   material: JUKEBOX
#   page: 1
#   slot: 34
#   amount: 1
#   lore:
#     - '&7Resume and pause the active radio song!'
#     - ''
#     - '&6Click &7to toggle'
#
# custom-item-example:
#   name: '&eCustom Item'
#   material: DIAMOND
#   slot: 45
#   amount: 1
#   lore:
#     - '&7An example of a non-setting item'
#     - ''
#     - '&6Click &7to interact'

# This section defines the display properties of the toggle on item
enabled:
  name: "&a&lOn"
  material: "INK_SACK:10"
  amount: 1
  lore:
    - ""
    - "&7Click to &cdisable"

# This section defines the display properties of the toggle off item
disabled:
  name: "&cOff"
  material: "INK_SACK:8"
  amount: 1
  lore:
    - ""
    - "&7Click to &aenable"

# This section defines the display properties of the dismiss item
dismiss:
  name: "&cClose"
  material: "BARRIER"
  slot: 49
  amount: 1
  lore:
    - ""
    - "&6Click &7to close the menu"
  # A list of commands that will be executed when this item is pressed
  #
  # Custom commands:
  # - "playersettings close" : Closes the settings inventory
  onPress:
    - "playersettings close"

next-page:
  name: "&aNext page &7(%current%/%max%)"
  material: "ARROW"
  slot: 53
  amount: 1
  lore:
    - ""
    - "&6Click &7to go to the next page"

previous-page:
  name: "&cPrevious page &7(%current%/%max%)"
  material: "ARROW"
  slot: 45
  amount: 1
  lore:
    - ""
    - "&6Click &7to go to the previous page"

vanish-setting:
  name: '&6&lVanish &f(%current%)'
  material:
    0: GLASS_BOTTLE
    1: POTION
  page: 1
  slot: 29
  lore:
    - '&7Make yourself invisible to other players!'
    - ''
    - '&6Click &7to toggle'
  base-effect: 'INVISIBILITY, false, false'
  flags: [ 'HIDE_ATTRIBUTES', 'HIDE_POTION_EFFECTS' ]

visibility-setting:
  name: '&6&lVisibility &f(%current%)'
  material:
    0: ENDER_PEARL
    1: ENDER_EYE
  page: 1
  slot: 33
  lore:
    - '&7Shows and hides other players from your sight!'
    - ''
    - '&6Click &7to toggle'
settings.yml
# Settings Configuration Format:
#
# | A unique name to identify this setting
# example-setting:
#   | Property to toggle the setting
#   enabled: true
#
#   | The display name of the setting
#   name: "&aExample"
#
#   | The default value players have for this setting
#   default: 0
#
#   | Maximum value allowed (optional, default is 1)
#   max: 1
#
#   | List of events/actions that should trigger the side effects for the current value of the setting
#   |
#   | Available triggers:
#   | - join: Trigger when the player joins
#   | - respawn: Triggers when a player respawns
#   triggers: ["join", "respawn"]
#
#   | The permission required to disable this setting
#   disable-permission: "settings.example.disable"
#
#   | Toggleable settings:
#   | A list of commands that will be executed when the setting is enabled and disabled
#   |
#   | * If the 'values' property is defined these callbacks will be ignored
#   onEnable:
#     - "me %player% %value%"
#   onDisable:
#     - "me %player% %value%"
#
#   | Multi level settings:
#   | A map of values that each hold a list of commands that will be executed respective to the
#   | value of the setting
#   |
#   | * You can run a command in the console by appending 'SUDO ' to the command
#   | * The 'default' section allows your setting to fallback to a default list of commands when the
#   |   value the setting was changed to is not defined in this list
#   values:
#     0:
#       - "me %player% %value%"
#     1:
#       - "me %player% %value%"
#     default:
#       - "me %player% %value%"
#
#   | Section to define overrides for this specific setting
#   overrides:
#     | Override properties of the enabled/disabled items
#     |
#     | * Use the same properties that you pass when configuring an item in the 'items.yml' file
#     | * No need to re-define every property for the item, just the ones you want to override
#     enabled-item:
#       name: "&aEnabled"
#       material: LIME_STAINED_GLASS
#     disabled-item:
#       name: "&cDisabled"
#       material: RED_STAINED_GLASS
#
#     | Override the sounds played when a player interacts with a setting
#     |
#     | * Format: [Sound], [Volume], [Pitch]
#     sounds:
#       setting-toggle-on: "BLOCK_NOTE_BLOCK_HARP, 1, 1"
#       setting-toggle-off: "BLOCK_NOTE_BLOCK_HARP, 1, -99"
#
#     | A map of aliases to use when displaying the value of a setting
#     |
#     | * Values can be mapped to an alias or a list of aliases
#     | * The first alias in the list will be used to display the setting value
#     | * The alias for value 0 will be used to display all setting values less than 1
#     value-aliases:
#       0: ["off", "x0"]
#       1: ["on", "x1"]
#       2: "x2"
#       3: "x3"
#       4: "x4"
#       5: "x5"
#       6: "x6"
#       7: "x7"
#       8: "x8"
#       9: "x9"
#       10: "x10"
#
# Examples:
#
# | AuthMeReloaded https://www.spigotmc.org/resources/authmereloaded.6269/
# premium-setting:
#   enabled: true
#   name: "&dPremium"
#   default: 0
#   triggers: []
#   onEnable:
#     - "SUDO premium %player%"
#   onDisable:
#     - "SUDO cracked %player%"
#
# | GMusic https://www.spigotmc.org/resources/gmusic-%E2%9C%A8-modern-jukebox-music-note-block-plugin-1-13-x-1-19-x.84004/
# radio-setting:
#   enabled: true
#   name: "&dRadio"
#   default: 0
#   triggers: []
#   onEnable:
#     - "music resume"
#   onDisable:
#     - "music pause"

fly-setting:
  enabled: true
  name: "&6Fly"
  default: 0
  max: 10
  # Saves the flight state when a player leaves the game server
  save-state: true
  # Forces the player into flight mode when they join the game server
  #
  # * This property will respect if save-state is enabled i.e. it won't force flight mode if the player had flight disabled
  force-on-join: false
  triggers: [ "join", "respawn" ]

Clone this wiki locally