Vanilla Minecraft Leaderboard Creator
'vanilla-mc-leaderboard' (Vanilla Minecraft Leaderboard Creator) generates a leader board based on the XP of the players on an unmodified Minecraft server, giving players something to compete over. You can see it in action at https://ketchup.games/.
If you would like any additional functionality or support for Vanilla Minecraft Leaderboard please get in touch via our contact page.
View the project on GitHub.
If you plan on running this script yourself I recommend using cron to execute the script on a regular basis.
This script is intended for use with Python 3. It requires the following libraries, available on pip3;
To use the script you will need to create the following database tables:
CREATE TABLE leaderboard ( id INT(11) auto_increment, uuid VARCHAR(36), score INT(10), time DATETIME, PRIMARY KEY (id) ); CREATE TABLE mcUnameCache ( id INT(11) auto_increment, uuid VARCHAR(36), uname VARCHAR(16), time DATETIME DEFAULT current_timestamp(), PRIMARY KEY (id) );
Using the PHP script
If you wish to use the PHP script to display leader boards you can add it into a PHP page by including it and calling 'display' as shown below.
include "vanilla-mc-leaderboard/vanilla-mc-leaderboard.php"; vanillaMcLeaderboard::display();
You will also need to add your SQL details to the script. Additionally you can configure the length of time Minecraft usernames are cached in the database by changing the value of 'cacheFor'; this value is in hours and usernames are kept for one week by default. You also have the option of disabling the 'Powered by' link on the leader board by setting 'displayPoweredBy' to false.
Distributed under the GNU General Public License version 3 or later, see LICENCE.