About

'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 to be notified when new versions of vanilla-mc-leaderboard are available please contact This email address is being protected from spambots. You need JavaScript enabled to view it. with the request in the subject. Our mail server is young and emails from us may end up in your spam folder, so it is worth adding our address to your contacts so you don't miss our messages.

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.

PHP Requirements

This script is intended for use with Python 3. It requires the following libraries, available on pip3;

mysql-connector

nbt

Database

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.

vanilla-mc-leaderboard Legal

Copyright (C) 2020 Alexander Theulings, ketchupcomputing.com <This email address is being protected from spambots. You need JavaScript enabled to view it.>

Distributed under the GNU General Public License version 3 or later, see LICENCE.