-
Notifications
You must be signed in to change notification settings - Fork 13
Config file
At first startup, the config file is created. Be sure to also look there as it contains the default values and the format in which the file is expected. By default it only enables the scoreboard source, and it will use all objectives.
(since v1.0)
The port number to use. Set this to the port you opened in getting Started step 2.
Example:
port: 8080
(since v1.8)
A list of tables to show on the webpage. A table contains:
-
name: The name of the table, which is displayed above it. By default, a table has no name. -
columns: A list of columnn names, to specify a custom column order. Columns not present in this list will be hidden (you don't need to specify the 'player' column; it is always present, and always as the first column). By default, all columns are displayed in alphabetical order.Example: this will only display the columns with names Mine Diamond, Biome and Deaths, in that order. (these names correspond to scoreboard objectives / placeholder names / database items defined in their respective configuration sections)
columns: [Mine Diamond, Biome, Deaths]
Player Mine Diamond Biome Deaths 
-
sort-column: The table on the webpage will initially be sorted by this column. -
sort-direction: In which direction to sort. Eitherascending(smallest first, default) ordescending.
(since v1.5, deprecated in v1.8)
See the columns item of tables.
(since v1.8)
A list of column names which belong to the server itself instead of to a
specific player. Instead of being displayed next to a player, they will be shown
on the server's own row.
(since v1.9)
A map from column names to the unit in which the values of that column are
stored. WebStats will use this information to automatically convert the values
into the best readable form.
These are the available units:
-
Time:
ticks,milliseconds/ms,seconds/s,minutes/min,hours/h,days/d
WebStats will format these time durations in the form0 days 00:00:00(leaving out days and hours when zero), or0.000 s. -
Distance:
millimetres/millimeters/mm,centimetres/centimeters/cm,blocks/metres/meters/m,kilometres/kilometers/km
WebStats will convert between any of these units, choosing the unit resulting in a value between 1–999. -
Date:
timestamp(values like 1693672607),formatted date(values such as Sat, 02 Sep 2023 16:38:32 GMT or similar)
WebStats will format all dates in the user's locale. -
Items:
items,items16(for 16-stackables such as ender pearls)
WebStats will format item counts in the form0 st 0. -
Percentage:
percent
WebStats will format these values with a%appended, values are assumed to be between 0 and 100.
Example:
column-units: Play Time: ticks Aviate: cm Mine Diamond: items Last Seen: timestamp
(since v1.9)
The configuration for serving content over HTTPS (as opposed to plain HTTP). To
use WebStats with HTTPS, you need to supply (and renew!) a valid certificate
yourself and put it in plugins/WebStats/. Note that if you enable HTTPS, you
can no longer access the stats over plain HTTP.
The path to the .p12 keystore file, relative to plugins/WebStats/.
The password with which the keystore file is locked.
(since v1.7)
Whether to persistently store the mapping of IPs to player names. This mapping
is used to highlight you on the webpage, and will otherwise be lost every time
the server stops.
(since v1.7)
Whether to use the internal webserver to serve the webpage, instead of only the
raw stats.json
(since v1.9)
A list of files in the plugins/WebStats/web/ directory to expose to the public.
Note that serve-webpage needs to be enabled for these files to be served!
Example: this will serve the file at
plugins/WebStats/web/logo.pngtoip:port/logo.png.additional-resources: [logo.png]
(since v1.8)
When using serve-webpage, this is the title of the webpage.
(since v1.1)
The list of scoreboard objectives to collect. * means all objectives.
Since v1.11, you can customise the display name of scoreboard objectives.
Example: this will add the scoreboard objectives called Deaths and Mine Diamond, and display the latter one as Mine Shiny Rocks
objectives: - Deaths - Mine Diamond: Mine Shiny Rocks
Example: this will list all scoreboard objectives
objectives: ['*']
(since v1.4)
The database credentials, as used by both the MySQL database connectivity and
the placeholder storer. You can use multiple databases, as long as they are
located on the same machine. (this was just convenience, open an issue if you
want multiple databases on multiple machines)
If you use the database(s) on the same server as your Minecraft server, this
will be localhost. Otherwise, this is the IP or URL to the database server.
You know what to do.
A list of database-table configurations. This item is specific to the MySQL connectivity, the placeholder storer does not use this. To enable the MySQL source, uncomment this. Each item contains:
-
database: the name of the database to use. -
table: the name of the table within the database to use. -
convert: a list of conversion commands. See the wiki page on MySQL database connectivity for command-specific information. Theconfig.ymlcontains an example usage which may be helpful.
Example: This will connect to localhost with given username and password. On request, the table 'mytable' in database 'mydatabase' is loaded. First, the JSON in column 'value' is read and the value in each key of the object is stored in the corresponding column. Then, the UUIDs in column 'id' are converted to player names and the column is renamed to 'Player'.
database: hostname: localhost username: mydatabaseuser password: mypassword123 config: - database: mydatabase table: mytable convert: - [json, value] - [uuid, id]With this config, the following database table:
id value 8fe4d255-bdb4-48fc-a364-e8c94a22b421 {"exp": 42.0, "offlineExp": 0.0}8fe4d255-bdb4-48fc-a364-e8c94a22b421 {"money": 0.0}069a79f4-44e9-4726-a5be-fca90e38aaf5 {"exp": 16.0, "offlineExp": 16.0}Is converted to this output on the webpage:
Player exp offlineExp money RedPolygon 42.0 0.0 0.0 Notch 16.0 16.0
(since v1.4)
The configuration for the PlaceholderAPI connectivity. The key of every entry
here specifies the placeholder to use, the value sets the displayed name.
Example: This will add a column called Biome from the placeholder
%player_biome%placeholders: '%player_biome%': Biome
(since v1.8)
Because many placeholderAPI sources don't have data for offline players, you can
enable this to store offline players' placeholders locally in a csv file and
remember their statistics even when they go offline. (mutually exclusive with
store-placeholders-database)
(since v1.5)
Instead of storing the placeholders in a csv file, it is also possible to use
a database instead. This is the name of the database to use (mutually exclusive
with store-placeholders-in-file). When you
use this, you need to set the hostname, username and password fields
under the database config. (see above, you can leave the config option
commented out)
Example: this is what our configuration looks like (with PebbleHost). If you have created a database called customer_12345_mydatabase with corresponding username and password, this will store the placeholder values of offline players in a table called WebStats_placeholders (it will create this table automatically)
database: hostname: localhost username: customer_12345_mydatabaseuser password: 'GYEXMn7dA$11Nvb9pWZt' # not my password, don't worry store-placeholders-database: customer_12345_mydatabase
(since v1.11)
These are the values that placeholders return when there is no data. WebStats
automatically detects an empty response and the name of the placeholder as
empty, but some placeholders have some default content.
Example: this sets the "empty" value for the placeholder '%player_biome%' to '"0"' (nonsensical example but you get the point)
placeholder-empty-values: '%player_biome%': 0
(since v1.7)
The configuration for the Discord webhook.
The URL to send the webhook requests to. More information on how to get this in the Discord webhook page.
The amount of minutes to wait between updating the embed message.
The maximum number of players to show in the embed message.
Text to be displayed before the embed, as a title. This is the title of the entire message, individual embeds can also have a title.
Example:
title: Here are the stats for my awesome server!
A list of embed configs. Each element in this list defines one embed that gets added to the message:
-
title: an optional title that gets displayed op top of the embed. -
sort-column: the name of the column (statistic) by which the players will be sorted. -
sort-direction: this can be eitherascendingordescending. Ascending means that the smallest value will come first, descending will put the largest values on top. -
columns: the list of columns (statistics) to display. Note that when you add more than 2 columns, they will not line up anymore.
If you comment this out, all the columns fromcolumnsat the top of the file will be added, or all columns in general if that is not present.
Example:
- title: Location sort-column: Player sort-direction: ascending columns: [biome]

