Match History

Every finished duel is saved with each player's result, rating changes, combat counters, final health and final inventory. Players browse it in game; plugins and websites read it through the API.

Overview

Opening it

CommandDescriptionPermission
/matchhistory [player]Your matches, or another player's (online or offline)none
/match-history, /mh, /matchesAliasesnone

The menu always opens on Unranked, with a Ranked tab and pages of matches, newest first (page-size, default 7, in the dialog file). With gui.mode: DIALOG it is a dialog; otherwise a chest menu with a filter button and page arrows.

What a match shows

Clicking a match opens its page: kit, arena, match type, duration, score and when it ended, then one block per player.

Per playerNotes
ResultWin, loss or draw
Elo changeOnly when the match changed Elo (ranked)
Tier rating and tier changeOnly when tiers are on and the match counted
Kills, deaths, hitsHits are melee and projectile hits on other match players
Damage dealt and takenIn hearts
Totems, golden apples, ender pearls, potionsUsed during the match
Health, absorption, hungerWhen the player was eliminated or when the match ended
Final inventoryClick to open a read-only view: storage, armor and offhand

The inventory view shows copies of the saved items. Every click and drag is cancelled, including shift-click, hotbar keys and creative mode, so nothing can be taken out.

Configuration

In config.yml. Changes apply on /shyamduels reload-config confirm.

match-history:
  enabled: true
  # Days before a match is deleted. 0 keeps matches forever.
  keep-days: 30
  # Save each player's final inventory (about 1-4 KB per player per match).
  save-inventories: true

Texts: dialog-menus/match-history.yml (dialog mode), menus/match-history.yml (chest mode) and the match-history section of lang/messages.yml.

Storage

Developer API

ShyamDuelsAPI.matchHistory() returns the MatchHistoryService (API 2.1): pages of a player's matches, one match with inventories, recent matches and matches since a time, all as CompletableFutures. MatchRecordedEvent fires on the main thread when a match is saved. See Services, Data Models and Events.