Skip to Content
PandaScript

Configuration

Every setting in config.yml and how to change the messages in messages.yml.

PandaDuels has two settings files in plugins/PandaDuels/:

  • config.yml: how the plugin behaves.
  • messages.yml: every message players see.

Kits and arenas are not in these files. They are managed with commands and saved in kits.yml and arenas.yml.

Applying changes

Edit the file, then run /pd reload. This re-reads config.yml and messages.yml. Players waiting in queues stay queued.

A few settings are only read when the server starts. Restart the server after changing any of these:

  • everything under storage
  • ranked.start-elo, ranked.k-factor, ranked.placement-matches, ranked.placement-k-factor, ranked.floor
  • betting.tax
  • leaderboards.refresh-seconds

Storage

config.yml
storage:
  type: sqlite
  mysql:
    host: localhost
    port: 3306
    database: pandaduels
    user: pandaduels
    password: ""
    pool-size: 4
    parameters: "useUnicode=true&characterEncoding=utf8"
KeyDefaultMeaning
storage.typesqlitesqlite stores everything in plugins/PandaDuels/data.db. mysql uses a MySQL or MariaDB server.
storage.mysql.hostlocalhostDatabase server address.
storage.mysql.port3306Database server port.
storage.mysql.databasepandaduelsDatabase name. Create it first; PandaDuels creates the tables.
storage.mysql.userpandaduelsDatabase user.
storage.mysql.password""Database password.
storage.mysql.pool-size4Most connections PandaDuels keeps open. At least 2 are used.
storage.mysql.parametersuseUnicode=true&characterEncoding=utf8Extra connection options, added to the connection address.

All tables start with pd_.

If storage can't start (for example, wrong MySQL details), PandaDuels logs Storage could not start, PandaDuels is turning itself off with the reason, and disables itself.

PandaDuels does not copy data between SQLite and MySQL. Pick one before players start playing.

Lobby

config.yml
lobby: ""

Where players go after a match. Set it in game with /pd setlobby rather than by hand. It is saved as world;x;y;z;yaw;pitch.

Lobby items

config.yml
lobby-items:
  enabled: false
  clear-inventory: true
  items:
    unranked: { slot: 0, material: IRON_SWORD, name: "<green>Unranked queue", action: "queue unranked" }
    ranked: { slot: 1, material: DIAMOND_SWORD, name: "<aqua>Ranked queue", action: "queue ranked" }
    party: { slot: 4, material: NAME_TAG, name: "<yellow>Party", action: "party" }
    leaderboard: { slot: 7, material: BOOK, name: "<gold>Leaderboards", action: "leaderboard" }
    settings: { slot: 8, material: COMPARATOR, name: "<gray>Settings", action: "settings" }
KeyDefaultMeaning
lobby-items.enabledfalseGive players a hotbar of menu items in the lobby's world.
lobby-items.clear-inventorytrueEmpty the inventory before giving the items.
lobby-items.itemsfive itemsThe items. Each has slot, material, name and action.

See Lobby and signs for the actions and a warning before turning this on.

Match

config.yml
match:
  reconnect-seconds: 20
  combat-tag-seconds: 10
  round-delay-seconds: 3
  sneak-to-ready: true
  allowed-commands: [leave, forfeit, msg, tell, r, reply, w, me]
  win-commands: []
  lose-commands: []
  allow-containers: false
  sudden-death-seconds: 60
KeyDefaultMeaning
match.reconnect-seconds20Seconds a disconnected player has to come back before it counts as a forfeit. 0 forfeits at once.
match.combat-tag-seconds10A player who hit or was hit in the last this many seconds forfeits at once when they disconnect.
match.round-delay-seconds3Seconds between rounds. At least 1.
match.sneak-to-readytruePlayers can sneak between rounds to say they are ready. When everyone is ready, the next round starts at once.
match.allowed-commands[leave, forfeit, msg, tell, r, reply, w, me]Commands players may use during a match, without the /.
match.win-commands[]Console commands run for each winner when a match ends with a winner.
match.lose-commands[]Console commands run for each loser when a match ends with a winner.
match.allow-containersfalseLet players in a match open chests and other containers inside the arena. Off by default, because kit items could be hidden in them.
match.sudden-death-seconds60After a kit's time limit is reached, how many more seconds before the match ends in a draw. At least 10.

In win-commands and lose-commands, {winner}, {loser} and {kit} are filled in. In a win command, {winner} is the winner it runs for and {loser} lists the losers. In a lose command it is the other way round. For example:

config.yml
match:
  win-commands:
    - "eco give {winner} 50"

Own inventory

config.yml
own-inventory:
  allow-stake: true
KeyDefaultMeaning
own-inventory.allow-staketrueAllow /duel <player> own stake, where the loser's items go to the winner. The winner collects them with /duel claim.

Betting

config.yml
betting:
  enabled: true
  min: 100
  max: 1000000
  tax: 0.0
KeyDefaultMeaning
betting.enabledtrueAllow money bets on duels. Also needs Vault and an economy plugin.
betting.min100Smallest bet.
betting.max1000000Largest bet.
betting.tax0.0Part of the pot the server keeps. 0.05 is 5%. Between 0 and 1. Restart to apply.

See Money bets.

Requests

config.yml
requests:
  expire-seconds: 30
  cooldown-seconds: 5
KeyDefaultMeaning
requests.expire-seconds30Seconds before a duel or party duel request expires. At least 5.
requests.cooldown-seconds5Seconds before a player can send the same player another duel request.

Queue

config.yml
queue:
  elo-range-start: 75
  elo-range-per-second: 10
  elo-range-max: 400
  max-ping-difference: 0
  block-same-address: true

These only affect ranked queues.

KeyDefaultMeaning
queue.elo-range-start75Elo gap allowed as soon as a player joins.
queue.elo-range-per-second10How much the allowed gap grows each second of waiting.
queue.elo-range-max400The largest the allowed gap grows to.
queue.max-ping-difference0Largest allowed ping difference in milliseconds. 0 turns the check off.
queue.block-same-addresstrueNever match two players connecting from the same address.

See Queues and ranked.

Ranked

config.yml
ranked:
  start-elo: 1000
  k-factor: 32
  placement-matches: 5
  placement-k-factor: 64
  floor: 0
  max-same-opponent-per-day: 5
  season-keep: 0.5
  divisions:
    bronze: { name: "<#cd7f32>Bronze", min-elo: 0, commands: [] }
    silver: { name: "<gray>Silver", min-elo: 1100, commands: [] }
    gold: { name: "<gold>Gold", min-elo: 1250, commands: [] }
    diamond: { name: "<aqua>Diamond", min-elo: 1450, commands: [] }
    master: { name: "<light_purple>Master", min-elo: 1700, commands: [] }
KeyDefaultMeaning
ranked.start-elo1000Elo every player starts each kit with. Restart to apply.
ranked.k-factor32How far Elo moves per match after placements. Restart to apply.
ranked.placement-matches5Number of first ranked games per kit that use the placement K-factor. Restart to apply.
ranked.placement-k-factor64How far Elo moves per match during placements. Restart to apply.
ranked.floor0Elo never drops below this. Restart to apply.
ranked.max-same-opponent-per-day5After this many ranked 1v1s between the same two players in one day, their Elo stops moving for the rest of the day. 0 turns the limit off.
ranked.season-keep0.5How much of each player's distance from start-elo a season reset keeps. 0.5 is halfway back, 0 is a full reset.
ranked.divisionsfive divisionsNamed Elo bands. Each has name (MiniMessage), min-elo and commands (console commands run on promotion, with {player}).

See Queues and ranked for the Elo formula, divisions and season resets.

Tournament

config.yml
tournament:
  signup-seconds: 60
  min-entries: 4
  winner-commands: []
KeyDefaultMeaning
tournament.signup-seconds60How long signups stay open when /pd tournament start doesn't give a time. At least 10.
tournament.min-entries4Fewest entries a tournament needs to start. At least 2.
tournament.winner-commands[]Console commands run for every member of the winning entry. {player} and {kit} are filled in.

Leaderboards

config.yml
leaderboards:
  refresh-seconds: 60
  size: 10
KeyDefaultMeaning
leaderboards.refresh-seconds60How often leaderboards are read from storage. At least 10. Restart to apply.
leaderboards.size10Players per leaderboard, from 3 to 45.

messages.yml

Every message players see is in plugins/PandaDuels/messages.yml, written in MiniMessage. Edit a message, then run /pd reload.

messages.yml
prefix: "<gradient:#5ad1ff:#a07bff><bold>Duels</bold></gradient> <dark_gray>»</dark_gray> "

queue-joined: "<prefix><gray>Queued for <white><kit></white> <mode>. <click:run_command:'/leave'><red>[Leave]</red></click>"

Some things to know:

  • <prefix> inserts the prefix message. Change the prefix once and every message that uses it follows.
  • Tags such as <name>, <kit>, <seconds> or <amount> are filled in by PandaDuels. Each message only knows the tags it already has in the default file, so keep them when you reword a message.
  • Clickable buttons use MiniMessage click tags, for example <click:run_command:'/duel accept <name>'>. Keep the command inside them as it is.
  • If you delete a message from the file, PandaDuels uses the built-in default for it.
  • To get the default file back, rename yours and run /pd reload: PandaDuels writes a fresh messages.yml.

A few texts are not in messages.yml: menu titles and buttons, the sign text, staff replies to /pd commands, and the kit editor's buttons.

On this page