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.floorbetting.taxleaderboards.refresh-seconds
Storage
storage:
type: sqlite
mysql:
host: localhost
port: 3306
database: pandaduels
user: pandaduels
password: ""
pool-size: 4
parameters: "useUnicode=true&characterEncoding=utf8"| Key | Default | Meaning |
|---|---|---|
storage.type | sqlite | sqlite stores everything in plugins/PandaDuels/data.db. mysql uses a MySQL or MariaDB server. |
storage.mysql.host | localhost | Database server address. |
storage.mysql.port | 3306 | Database server port. |
storage.mysql.database | pandaduels | Database name. Create it first; PandaDuels creates the tables. |
storage.mysql.user | pandaduels | Database user. |
storage.mysql.password | "" | Database password. |
storage.mysql.pool-size | 4 | Most connections PandaDuels keeps open. At least 2 are used. |
storage.mysql.parameters | useUnicode=true&characterEncoding=utf8 | Extra 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
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
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" }| Key | Default | Meaning |
|---|---|---|
lobby-items.enabled | false | Give players a hotbar of menu items in the lobby's world. |
lobby-items.clear-inventory | true | Empty the inventory before giving the items. |
lobby-items.items | five items | The items. Each has slot, material, name and action. |
See Lobby and signs for the actions and a warning before turning this on.
Match
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| Key | Default | Meaning |
|---|---|---|
match.reconnect-seconds | 20 | Seconds a disconnected player has to come back before it counts as a forfeit. 0 forfeits at once. |
match.combat-tag-seconds | 10 | A player who hit or was hit in the last this many seconds forfeits at once when they disconnect. |
match.round-delay-seconds | 3 | Seconds between rounds. At least 1. |
match.sneak-to-ready | true | Players 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-containers | false | Let 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-seconds | 60 | After 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:
match:
win-commands:
- "eco give {winner} 50"Own inventory
own-inventory:
allow-stake: true| Key | Default | Meaning |
|---|---|---|
own-inventory.allow-stake | true | Allow /duel <player> own stake, where the loser's items go to the winner. The winner collects them with /duel claim. |
Betting
betting:
enabled: true
min: 100
max: 1000000
tax: 0.0| Key | Default | Meaning |
|---|---|---|
betting.enabled | true | Allow money bets on duels. Also needs Vault and an economy plugin. |
betting.min | 100 | Smallest bet. |
betting.max | 1000000 | Largest bet. |
betting.tax | 0.0 | Part of the pot the server keeps. 0.05 is 5%. Between 0 and 1. Restart to apply. |
See Money bets.
Requests
requests:
expire-seconds: 30
cooldown-seconds: 5| Key | Default | Meaning |
|---|---|---|
requests.expire-seconds | 30 | Seconds before a duel or party duel request expires. At least 5. |
requests.cooldown-seconds | 5 | Seconds before a player can send the same player another duel request. |
Queue
queue:
elo-range-start: 75
elo-range-per-second: 10
elo-range-max: 400
max-ping-difference: 0
block-same-address: trueThese only affect ranked queues.
| Key | Default | Meaning |
|---|---|---|
queue.elo-range-start | 75 | Elo gap allowed as soon as a player joins. |
queue.elo-range-per-second | 10 | How much the allowed gap grows each second of waiting. |
queue.elo-range-max | 400 | The largest the allowed gap grows to. |
queue.max-ping-difference | 0 | Largest allowed ping difference in milliseconds. 0 turns the check off. |
queue.block-same-address | true | Never match two players connecting from the same address. |
See Queues and ranked.
Ranked
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: [] }| Key | Default | Meaning |
|---|---|---|
ranked.start-elo | 1000 | Elo every player starts each kit with. Restart to apply. |
ranked.k-factor | 32 | How far Elo moves per match after placements. Restart to apply. |
ranked.placement-matches | 5 | Number of first ranked games per kit that use the placement K-factor. Restart to apply. |
ranked.placement-k-factor | 64 | How far Elo moves per match during placements. Restart to apply. |
ranked.floor | 0 | Elo never drops below this. Restart to apply. |
ranked.max-same-opponent-per-day | 5 | After 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-keep | 0.5 | How much of each player's distance from start-elo a season reset keeps. 0.5 is halfway back, 0 is a full reset. |
ranked.divisions | five divisions | Named 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
tournament:
signup-seconds: 60
min-entries: 4
winner-commands: []| Key | Default | Meaning |
|---|---|---|
tournament.signup-seconds | 60 | How long signups stay open when /pd tournament start doesn't give a time. At least 10. |
tournament.min-entries | 4 | Fewest 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
leaderboards:
refresh-seconds: 60
size: 10| Key | Default | Meaning |
|---|---|---|
leaderboards.refresh-seconds | 60 | How often leaderboards are read from storage. At least 10. Restart to apply. |
leaderboards.size | 10 | Players 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.
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 theprefixmessage. 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 freshmessages.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.