Skip to Content
PandaScript

Spectating and stats

Watching matches, stats, leaderboards, match history, and what happens when players disconnect.

Spectating

/spectate <player>

/spec is short for /spectate. It needs pandaduels.spectate, which everyone has by default.

When you start spectating:

  1. Your items, health, game mode and position are saved (also to the database, so a crash can't lose them).
  2. You are switched to spectator mode and sent to the arena's spectator spawn.
  3. Players in the match see <you> is watching.

While spectating you can't move more than 24 blocks from the arena, hit anyone or pick anything up. To watch a different match, run /spectate again with another player.

To stop, run /leave or click [Leave] in the chat message. You get everything back and go to the lobby (or where you were, if there is no lobby). When the match ends, spectators are sent back the same way and see the match summary.

You can't start spectating while you are in a match, a queue or editing a kit.

Stats

PandaDuels keeps these numbers for every player, per kit and overall:

StatCounts
EloRanked rating. Starts at ranked.start-elo. The overall Elo is the average of the kits a player has played ranked.
Wins, lossesEvery finished match: queues, duels, party matches and tournaments.
Kills, deathsEliminations in every finished match. A player who forfeits counts as a death, and their last attacker gets the kill.
StreakWins in a row. A loss sets it to 0.
Best streakThe longest streak ever.

Draws count kills and deaths but no win or loss. Matches that are cancelled (by /pd end, a failed start or the server stopping) don't count at all.

CommandWhat it does
/statsOpens a menu with your stats per kit.
/stats <player>Shows a player's stats in chat, online or not. Works from the console too.
/stats <player> <kit>Only that kit.

Staff can delete all of a player's stats with /pd resetstats <player>. Do this while the player is offline: an online player keeps their stats in memory and their next match saves them back.

Leaderboards

/leaderboard [kit]

/lb and /top are short for /leaderboard. Without a kit, a menu lists Everything (all kits together) and each kit. Each board shows the top players for:

  • Elo (only players who have played that kit ranked)
  • Wins
  • Kills
  • Best streak

Boards are read from the database every leaderboards.refresh-seconds (60) and hold leaderboards.size (10) players. The same boards feed the %pandaduels_top_...% placeholders.

Match history

/duelhistory [player]

/matches is short for /duelhistory. It shows a player's last 10 matches: win or loss, kit, opponents, when it ended (server time), and the Elo change for ranked matches.

End-of-match summary

When a match ends, every player and spectator gets a summary in chat:

  • The winner and the loser.
  • For each player: hits landed, best combo, health left and potions used.
  • An [Inventory] button that shows that player's inventory at the end of the match.
  • [Rematch] and [Queue again] buttons.

Ranked players also see their Elo change, and a message if they reached a new division.

The inventory views are kept in memory for the last 200 matches and are lost on restart.

Disconnects and combat logging

If a player disconnects during the fight:

  • They have match.reconnect-seconds (20) to come back. Everyone in the match sees how long.
  • If they come back in time, they go back into the match where they were. If a new round started while they were gone, they get that round's fresh kit. If they were already out of the round, they watch as a spectator.
  • If they don't come back in time, they forfeit.

A player forfeits straight away when they disconnect and any of these is true:

  • They hit someone or were hit in the last match.combat-tag-seconds (10).
  • The match was in its countdown or between rounds.
  • match.reconnect-seconds is 0.

A forfeit is a loss. When the player joins again, they get their items back and go to the lobby.

Commands during a match

Players in a match can only use the commands in match.allowed-commands:

config.yml
match:
  allowed-commands: [leave, forfeit, msg, tell, r, reply, w, me]

Anything else shows You can't use that command in a match. /leave to forfeit. Players with pandaduels.bypass.commands can use any command.

/leave (or /forfeit) during a match forfeits it and sends the player to the lobby straight away.

Items are always given back

Before a match changes anything, each player's inventory, ender chest, health, hunger, experience, effects, game mode and position are saved to the database. After the match they get it all back.

If the server crashes or is killed mid-match, players get everything back the next time they join, with the message Your items were given back after the server restarted mid-match.

On this page