Get Nexal Leaderboards on the Nexal Studios store
config.yml
The configuration file for Nexal Leaderboards. Located at plugins/NexalLeaderboards/config.yml.
# ================================
# Nexal Leaderboards Configuration
# ================================
# Used by the plugin to update this file. Do not change it.
config-version: 3
# Storage settings
storage:
# Storage type: json or sql
# To move your data: /lb admin export, change the type, /lb admin reload, /lb admin import
type: json
# SQL database settings (only used if type is 'sql')
sql:
host: localhost
port: 3306
database: minecraft
username: root
password: ""
# Default refresh interval in seconds (minimum 10)
# This is used when a new placeholder starts being tracked
# Individual leaderboards can have their own interval set via /lb admin setinterval
default-refresh-interval: 300 # 5 minutes
# Automatically start tracking a placeholder when it's first queried via PAPI
# (e.g. %nexalleaderboards_vault_eco_balance_1%). Only placeholders that give a number
# for at least one online player are tracked; anything else is ignored.
# If false, placeholders must be manually tracked using /lb admin track
auto-track-on-query: true
# Maximum players to track per leaderboard (performance optimization)
# Set to -1 for unlimited
max-tracked-per-leaderboard: 1000
# GUI settings
gui:
# How often an open leaderboard GUI redraws, in ticks (20 ticks = 1 second)
auto-refresh-ticks: 100 # 5 seconds
# The name players see for a leaderboard instead of its placeholder, by placeholder name: in
# /lb top, /lb player, the reward messages, the leaderboard GUI, holograms, signs, heads and NPCs.
# Colour tags are allowed. A leaderboard without a name shows its placeholder. Admin messages
# keep the placeholder, since that is what commands take. As a PlaceholderAPI placeholder:
# %nexalleaderboards_<placeholder>_name%.
# Also in-game: /lb admin, Leaderboards, a leaderboard, then Display Name.
# Example:
# display-names:
# statistic_time_played: "Playtime"
# vault_eco_balance: "<gold>Richest</gold>"
display-names: {}
# Leaderboards that rank the lowest value first (best lap time, fewest deaths) instead of the
# highest, by placeholder name. The _reversed placeholders count from the other end.
# Also in-game: /lb admin, Leaderboards, then a leaderboard's Ranking Order.
lowest-first: []
# Commands run from the console for the top players of a leaderboard when a calendar period
# ends (a new day, week, month or year), by placeholder name, then period, then a rank or a
# range of ranks. In a command: %player%, %uuid%, %rank%, %value% (in the leaderboard's number
# format), %period% (its name), %placeholder% (the placeholder itself) and %name% (the
# leaderboard's display name, see display-names). Players who are offline get theirs the next
# time they join. A reward set up during a period is first paid at the end of that period.
# Also in-game: /lb admin, Leaderboards, a leaderboard, then Rewards.
# Example:
# rewards:
# vault_eco_balance:
# weekly:
# "1":
# - "eco give %player% 10000"
# "2-3":
# - "eco give %player% 5000"
rewards: {}
# Announce the rewarded players in chat when a period's rewards are paid (the texts are
# reward-broadcast-header and reward-broadcast-entry in messages.yml).
# Also in-game: /lb admin, Configuration.
rewards-broadcast: true
# The arrows next to a rank (▲3, ▼1, NEW) compare it with the rank this many hours ago, on the
# same board: %nexalleaderboards_<placeholder>_<pos>_change%, _rank_change, the GUI and the
# holograms. The arrows themselves are in messages.yml. Also in-game: /lb admin, Configuration.
rank-change:
hours: 24
# How values are written in /lb top, /lb gui, holograms and the _formatted placeholders
# number: 1,234,567.5
# compact: 1.2M (the letters are in messages.yml)
# time: 2d 3h 15m, for placeholders that give a time
# unit: what a time placeholder counts in: ticks, seconds, minutes or hours.
# A placeholder can ask for another form with _number, _compact, _time or a unit, such as
# %nexalleaderboards_<placeholder>_1_compact% or _1_time_ticks.
# Also in-game: /lb admin, Leaderboards, then a leaderboard's Number Format.
number-format:
default: number
unit: seconds
# Leaderboards with a format of their own, by placeholder name
leaderboards:
statistic_time_played:
type: time
unit: ticks
# ================================
# Periods
# ================================
# Leaderboards for a stretch of time: today, this week, the last 30 days and so on. A period's
# score is how much a player's value grew in it (kills this week, money earned this month).
# Use one with %nexalleaderboards_<placeholder>_<period>_<pos>%, /lb top <placeholder> <period>,
# /lb gui <placeholder> <period> or /lb admin hologram create <name> <placeholder> [lines] <period>.
#
# The scores come from the score history below, so a period added later covers the past too,
# as far back as the history goes. History starts when a placeholder is first tracked.
#
# type: calendar starts again at the beginning of every unit: day, week, month or year
# (week-start: the day a week starts, default monday)
# type: rolling the last <days> or <hours> before now, moving on every hour
# name: shown in GUIs, holograms and chat
#
# The key (daily, 7d) is used in placeholders and commands: lowercase letters and digits only.
# Also in-game: /lb admin, Periods.
periods:
daily:
type: calendar
unit: day
name: "Today"
weekly:
type: calendar
unit: week
week-start: monday
name: "This Week"
monthly:
type: calendar
unit: month
name: "This Month"
24h:
type: rolling
hours: 24
name: "Last 24 Hours"
7d:
type: rolling
days: 7
name: "Last 7 Days"
30d:
type: rolling
days: 30
name: "Last 30 Days"
# Time zone the calendar periods start in, such as Europe/Athens or America/New_York.
# Leave empty to use the server's time zone.
timezone: ""
# Score history, kept for every player on every leaderboard
history:
# For how many days a score is kept for every hour. After that, one score per day is kept.
# Periods in hours (24h) need the hourly scores.
hourly-days: 7
# For how many days scores are kept at all (1 to 3650). No period can reach further back,
# and a longer history means a bigger data file.
retention-days: 400
Configuration Options
Below is a reference of the main configuration sections:
config-version
================================ Nexal Leaderboards Configuration ================================
Used by the plugin to update this file. Do not change it.
storage
Storage settings
default-refresh-interval
Default refresh interval in seconds (minimum 10) This is used when a new placeholder starts being tracked Individual leaderboards can have their own interval set via /lb admin setinterval
auto-track-on-query
Automatically start tracking a placeholder when it's first queried via PAPI (e.g. %nexalleaderboards_vault_eco_balance_1%). Only placeholders that give a number for at least one online player are tracked; anything else is ignored. If false, placeholders must be manually tracked using /lb admin track
max-tracked-per-leaderboard
Maximum players to track per leaderboard (performance optimization) Set to -1 for unlimited
gui
GUI settings
display-names
The name players see for a leaderboard instead of its placeholder, by placeholder name: in
/lb top, /lb player, the reward messages, the leaderboard GUI, holograms, signs, heads and NPCs.
Colour tags are allowed. A leaderboard without a name shows its placeholder. Admin messages
keep the placeholder, since that is what commands take. As a PlaceholderAPI placeholder:
%nexalleaderboards_<placeholder>_name%.
Also in-game: /lb admin, Leaderboards, a leaderboard, then Display Name.
Example:
display-names:
statistic_time_played: "Playtime"
vault_eco_balance: "<gold>Richest</gold>"
lowest-first
Leaderboards that rank the lowest value first (best lap time, fewest deaths) instead of the highest, by placeholder name. The _reversed placeholders count from the other end. Also in-game: /lb admin, Leaderboards, then a leaderboard's Ranking Order.
rewards
Commands run from the console for the top players of a leaderboard when a calendar period
ends (a new day, week, month or year), by placeholder name, then period, then a rank or a
range of ranks. In a command: %player%, %uuid%, %rank%, %value% (in the leaderboard's number
format), %period% (its name), %placeholder% (the placeholder itself) and %name% (the
leaderboard's display name, see display-names). Players who are offline get theirs the next
time they join. A reward set up during a period is first paid at the end of that period.
Also in-game: /lb admin, Leaderboards, a leaderboard, then Rewards.
Example:
rewards:
vault_eco_balance:
weekly:
"1":
- "eco give %player% 10000"
"2-3":
- "eco give %player% 5000"
rewards-broadcast
Announce the rewarded players in chat when a period's rewards are paid (the texts are reward-broadcast-header and reward-broadcast-entry in messages.yml). Also in-game: /lb admin, Configuration.
rank-change
The arrows next to a rank (▲3, ▼1, NEW) compare it with the rank this many hours ago, on the same board: %nexalleaderboards_<placeholder>_<pos>_change%, _rank_change, the GUI and the holograms. The arrows themselves are in messages.yml. Also in-game: /lb admin, Configuration.
number-format
How values are written in /lb top, /lb gui, holograms and the _formatted placeholders
number: 1,234,567.5
compact: 1.2M (the letters are in messages.yml)
time: 2d 3h 15m, for placeholders that give a time
unit: what a time placeholder counts in: ticks, seconds, minutes or hours.
A placeholder can ask for another form with _number, _compact, _time or a unit, such as
%nexalleaderboards_<placeholder>_1_compact% or _1_time_ticks.
Also in-game: /lb admin, Leaderboards, then a leaderboard's Number Format.
periods
================================ Periods ================================
Leaderboards for a stretch of time: today, this week, the last 30 days and so on. A period's score is how much a player's value grew in it (kills this week, money earned this month). Use one with %nexalleaderboards_<placeholder><period><pos>%, /lb top <placeholder> <period>, /lb gui <placeholder> <period> or /lb admin hologram create <name> <placeholder> [lines] <period>.
The scores come from the score history below, so a period added later covers the past too, as far back as the history goes. History starts when a placeholder is first tracked.
type: calendar starts again at the beginning of every unit: day, week, month or year
(week-start: the day a week starts, default monday)
type: rolling the last <days> or <hours> before now, moving on every hour
name: shown in GUIs, holograms and chat
The key (daily, 7d) is used in placeholders and commands: lowercase letters and digits only. Also in-game: /lb admin, Periods.
timezone
Time zone the calendar periods start in, such as Europe/Athens or America/New_York. Leave empty to use the server's time zone.
history
Score history, kept for every player on every leaderboard