Skip to content

grawin/minecraft-status

 
 

Repository files navigation

minecraft-status

Python app for getting Minecraft server status.

This project is forked off of the barebones Python app using django provided by Heroku. *Source readme

This project makes use of Dinnerbone's MC Status API found here and packages the results into JSON that can be used on whatever webpage is desired to display the server status.

Sample usage

url = ''; // TODO - your Python app's URL here
$.getJSON(url + "?callback=?",
	function(data) {
		var output = "";
		var isOnline = false;
		if (!data) {
			output = "The server is down.";
			return;
		} else {		
			isOnline = true;
			output = 'Players online: ' + data.playerCount + " / " + data.maxPlayers + "<br/>";
			
			if (data.playerNames.length > 0) {
				output += ('&nbsp;&nbsp;&nbsp;' + data.playerNames.join(", ") + "<br/>");
			}
			output += ("Version: " + data.version + "<br/>Map Name: " + data.map + "<br/>");
		}
		// TODO - Stop any loading animations here, append your output to some div on your web page
		$('#status').append(output);
});

About

Python app for getting Minecraft server status.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 53.7%
  • Python 46.3%