Skip to content

Instantly share code, notes, and snippets.

View SPKuja's full-sized avatar

SPKuja SPKuja

View GitHub Profile
@amgraham
amgraham / Player Faces in Minecraft
Last active December 11, 2015 14:58
Generate a list of logged-in players & show their skins head.
<?php
/* DEMO ---------------------------------------------------------------------------------------------------------------------- */
/* This file is a working example, so with a few edits to this file and server.properties and a file or two created (with accurate permissions) on your server, you can be up and running in no time.
You will need to edit server.properties to enable a remote connection in your Minecraft server: 'enable-query=true' amd set a port for querying your server: 'query.port=25565'. You shouldn't use the default port number.
Edit this file just below (the first block of code): YOURSERVER.COM & YOURPORTNUMBER to the URL for your Minecraft server and the port number you specified in server.properties (not your server-port; this one needs to be query.port).
This script needs one file to store the player names in temporarily, and a folder to store their skins, we store player names for 5 seconds by default and skins for 24 hours. We do this to stop overloading your server, and http://mi