-
Notifications
You must be signed in to change notification settings - Fork 13
Getting Started
-
Download the
.jar
file from the latest release and place it in theplugins/
folder, like you would with any plugin.
(note: if you downloaded from the Spigot resources page, you will get a.zip
file with the files needed for both the minecraft server and the web server) -
Open a port for the plugin to communicate over.
-
Restart your server to let it generate the config file. Change the port number in
plugins/WebStats/config.yml
to the one you opened in the previous step.
It is possible to host the web files on your own website, but since version 1.7 WebStats can also serve the webpage for you (like Dynmap). Choose one of these two options:
-
Easy option: webpage served by WebStats
To enable WebStats' internal web server, setserve-webpage
totrue
inconfig.yml
.
It is still possible to customise the webpage, by manually adding a modified version ofindex.html
orstyle.css
toWebStats/web/
. Note that they will not be updated automatically when you update the plugin. -
Advanced option: webpage served by own web server
-
Download the
WebStats-dist.js
file from the latest release, and upload it to a directory on your web server.
(note: if you downloaded from the Spigot resources page, the file you need is in that zip file, along with the.jar
) -
Have a look at
web/example/index.html
. It contains a basic starting point for you to use, along with some nice-to-have features. The most important things are:
-
Download the
WebStats can gather statistics from multiple sources: the scoreboard, PlaceholderAPI and MySQL databases. Make sure you have at least one of these set up, otherwise your statistics webpage will stay empty!
By default only the scoreboard source is enabled. In order to populate the scoreboard, you will need other plugins or datapacks, like VanillaTweaks track (raw) statistics.
Since this is the simplest source, there is not a lot of configuration possible. You can list the scoreboard objectives you want to display in the objectives
config file item. If you add '*'
(default), the plugin will gather all objectives.
The PlaceholderAPI source is disabled by default. You need to uncomment placeholders
in the config file to enable it. You can specify which placeholders to use and give the name of their columns.
Since many placeholders are not available for offline players, WebStats offers a way to store these when players are online so that they are still visible after players go offline. To do this, WebStats needs a database to store the placeholders in. Set store-placeholders-database
to the name of the database to use for this and fill in the database access fields as mentioned in that link.
Disabled by default. If you have a plugin that stores its data in a database but does not expose that through for example the PlaceholderAPI, you can use this to directly read from that database. You first need to fill in the database access details (hostname, username and password). Then, you can add a configuration for each table to read from. More detailed info can be found on the MySQL database connectivity page.