Skip to main content

Admin Manual

Running Nexal Leaderboards day to day: who can do what, every admin screen, periods and history, keeping staff off the boards, storage and backups, and what to do when something looks wrong. Each feature has a page of its own under Features with more detail and examples; this page is the overview.

Permissions​

PermissionLets a playerDefault
nexalleaderboards.use/lb list, info, top, player, gui, and open the menu by clicking a hologram, sign, head or NPCeveryone
nexalleaderboards.adminEvery admin command and the admin menuop
nexalleaderboards.excludeNothing: it keeps the player off every leaderboardnobody
nexalleaderboards.exclude.<leaderboard>Keeps the player off one leaderboard, such as nexalleaderboards.exclude.vault_eco_balancenobody

To take the leaderboards away from a group, set nexalleaderboards.use to false, for example with LuckPerms: /lp group default permission set nexalleaderboards.use false.

The admin menu​

/lb admin opens the hub. From the console, the same command lists the admin commands. Everything in the menus can also be done with commands from the console: see Commands.

ButtonWhat you do there
ConfigurationThe plugin-wide settings, below
LeaderboardsTrack a new placeholder, and set up each leaderboard
PeriodsAdd, change and remove periods, and set the time zone
HologramsCreate, change, move and remove holograms
Signs, Heads and NPCsPlace, change, move and remove them
Export Data, Import DataBack up the data, or move it between JSON and SQL
ReloadRead config.yml and messages.yml again, and switch storage when storage.type changed

Buttons that change a number show what each click does in their description: usually left click adds, right click takes away, and shift click does both in bigger steps. Something you type (a name, a command, a placeholder) is asked in chat: the menu closes, you type it, and the menu opens again. Type cancel to stop.

A leaderboard's screen​

/lb admin → Leaderboards → a leaderboard.

ButtonWhat it doesSaved in
The paper at the leftThe display name (when it has one) and placeholder, players ranked, players excluded, last refresh, tracked since
Refresh IntervalHow often every online player's value is read again (10 seconds to 24 hours)storage
Number FormatNumber, compact or time, and the unit a time is counted inconfig.yml
Ranking OrderHighest value first, or lowest first (lap times, fewest deaths)config.yml
Refresh NowRead every online player's value right away
View RankingsOpen the menu players see
Stop TrackingShift right click: stop tracking and delete its scores, history, holograms, signs, heads and NPCs. There is no undo
Display NameThe name players see instead of the placeholder: left click and type it in chat (cancel to stop), right click to remove it. See Display Namesconfig.yml
RewardsCommands for the top players when a period ends: see Rewardsconfig.yml

A shorter refresh interval keeps the board more current, but reads the placeholder for every online player each time. The default 5 minutes suits most stats; a minute or two is fine for a small server.

Configuration​

/lb admin → Configuration. Every change is written to config.yml and applies at once.

SettingWhat it does
Default Refresh IntervalThe interval a newly tracked leaderboard starts with. Existing ones keep their own
Auto-Track on QueryWhen on, a %nexalleaderboards_<placeholder>_1% placeholder used anywhere starts tracking that placeholder by itself, if it gives a number. Turn it off to track only what you add
Max Players per LeaderboardThe most players ranked on one leaderboard (default 1000). Lower it on a very large server
GUI Refresh RateHow often an open leaderboard menu updates
Default Number FormatHow leaderboards without a format of their own write values
Hourly History, History RetentionHow much score history is kept: see below
Rank Change ArrowsHow far back ▲ and ▼ compare: 24 hours by default, one week for "since last week"
Announce WinnersAnnounce the rewarded players in chat when a period's rewards are paid

Periods​

More, with a worked example: Periods.

/lb admin → Periods. Every period ranks what players gained in it, on every leaderboard at once. There are two kinds:

  • Calendar: starts again at the beginning of every day, week, month or year. A week can start on any day. These are the periods that pay rewards.
  • Rolling: the last so many days or hours before now. It never starts again, it moves on every hour. Good for "the last 7 days" boards; it cannot pay rewards, since it never ends.

To add one, click Add Period and type a short key in chat, lowercase letters and digits such as season or 14d. The key is what placeholders and commands use (%nexalleaderboards_vault_eco_balance_season_1%). The new period starts as the last 7 days; change its kind, length or week start and its Display Name (what players see) on its screen.

Time Zone sets when calendar periods start: midnight in that zone. Type a name such as Europe/Athens or America/New_York, or server for the server's own. Set it to where most of your players are, so "Today" ends at their midnight.

Removing a period keeps the history. Add it back with the same key and its rankings come back.

Score history​

More: Score History.

Periods are worked out from a score history: the last value of every player for every hour, then one value per day.

  • Hourly History (default 7 days): how long the hourly values are kept. Periods measured in hours (Last 24 Hours) need them.
  • History Retention (default 400 days): how long any history is kept. No period reaches further back, so a yearly period needs at least 366 days.

Because the history is kept, a period you add later covers the past too, as far back as the history goes. A longer history makes data.json bigger: on a busy server with many leaderboards, lower the retention or use SQL.

Keeping staff off the leaderboards​

More: Keeping Players Off.

Give a player nexalleaderboards.exclude and they are left off every leaderboard from the next refresh; nexalleaderboards.exclude.<leaderboard> leaves them off one. Their scores keep being recorded, so when you take the permission away they come back with the right values.

  • Being op is not enough. Only a player who is given the permission is left out, so your own op account stays on the boards unless you give it to yourself.
  • Wildcards count. A group with * or nexalleaderboards.* has the exclude permission too. Set nexalleaderboards.exclude to false for such groups.
  • The leaderboard's screen and /lb info show how many players are excluded.

Holograms, signs, heads and NPCs​

All of them update after every refresh of their leaderboard, show all time or a period, and open the leaderboard menu when a player clicks them. Signs and heads cannot be broken, changed or blown up; remove them from their screen. Setting them up step by step: Build a leaderboard wall.

Editing config.yml​

You can also edit config.yml by hand. Changes apply when you save the file, without a restart. Only a change of storage.type needs Reload (or /lb admin reload). The whole file, with a comment on every setting, is on the config.yml page.

Storage​

The data lives in plugins/NexalLeaderboards/data.json (JSON), or in the leaderboards_* tables (SQL). Writes run off the main thread, so saving never lags the server.

Backups​

  • JSON: copy data.json while the server is stopped, or click Export Data and keep the export/ folder.
  • SQL: back up the tables with your usual database backups, or use Export Data.

Moving between JSON and SQL​

Step by step: Move to MySQL.

  1. Click Export Data (or /lb admin export). This writes everything to plugins/NexalLeaderboards/export/.
  2. Change storage.type in config.yml (and fill in storage.sql when moving to SQL).
  3. Click Reload. If the new storage cannot be opened, the old one stays in use.
  4. Click Import Data with a shift left click (or /lb admin import).

The import saves every record of the export into the current storage, and replaces records with the same ID. The same steps move the leaderboards to another server.

Placeholders​

Every leaderboard gets placeholders for names, values, the viewer's own rank and score, per period, with number formats and rank arrows. Ready lines: Show leaderboards on scoreboards and tab. The full grammar is on the Placeholders page.

Messages​

Every chat message, sound, menu text, and the text of holograms, signs and NPCs is in messages.yml, in MiniMessage format. Remove a key and the plugin uses the default text for it. The whole file is on the messages.yml page. The parts you are most likely to change:

SectionWhat it is
hologramThe header, the line per rank and the footer of holograms
sign.lines, npc.nameThe text of leaderboard signs and NPC names
leaderboard-guiThe menu players open
rank-changeThe ▲, ▼ and NEW arrows
number-formatThe letters of compact numbers and times (K, M, d, h)
reward-broadcast-header, reward-broadcast-entryThe winner announcement
display-name-prompt, display-name-set, display-name-removedNaming a leaderboard in /lb admin

In what players see, %placeholder% is the leaderboard's display name; in admin messages it stays the placeholder, which is what commands take. The comments in messages.yml say which is which.

Troubleshooting​

What you seeWhy, and what to do
does not give a number for anyone onlineThe placeholder prints text, or its expansion is missing. Test it with /papi parse me %<placeholder>% and install the expansion
Everyone has 0The placeholder gives text without digits for those players
A player is missingThey have not been online since it was tracked, or they are excluded: check the excluded count, and wildcards in their groups
A period board is emptyOnly players whose value changed in the period are ranked. A new leaderboard fills as players play
A placeholder you never added is trackedAuto-Track on Query picked it up from a scoreboard or sign. Turn it off in Configuration, and Stop Tracking the one you do not want
A reward was not paidSee Run a weekly competition
New NPC is a barrierNo NPC plugin: install FancyNpcs or Citizens and restart
That block is takenA sign or head needs an empty block (grass and flowers are fine). Click the side of a block that faces open air
data.json is largeLower History Retention or Hourly History, or move to SQL
The server lags at every refreshRaise the refresh intervals, or lower Max Players per Leaderboard