This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const util = require('minecraft-server-util'); | |
| const Discord = require('discord.js'); | |
| const client = new Discord.Client(); | |
| client.login('your_token_here'); | |
| // IMPORTANT: You need to run "npm i minecraft-server-util@^3.0.1 discord.js@^12.3.1" (without quotes) in your terminal before executing this script | |
| const server = { | |
| ip: '0.0.0.0', // Put your minecraft server IP or hostname here (e.g. '192.168.0.1') | |
| port: 25565 // Put your minecraft server port here (25565 is the default) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Skin { | |
| public static function get($username) { | |
| $steve = in_array(strtolower($username), array("steve", "player", "default")); | |
| if(!$steve) $contents = self::fetch('http://skins.minecraft.net/MinecraftSkins/' . $username . '.png'); | |
| $defaultImage = WideImage::load("char.png"); | |
| $defaultType = "image/png"; | |
| if ($steve || $contents === false) { | |
| $img = $defaultImage; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Skin { | |
| public static function get($username) { | |
| $contents = self::fetch('http://skins.minecraft.net/MinecraftSkins/' . $username . '.png'); | |
| $default = WideImage::load("char.png"); | |
| if ($contents === false) { | |
| header("Status: 404 Not Found"); | |
| return $default; | |
| } else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ChatColor | |
| @@color_char = "\u00A7" | |
| def initialize(code) | |
| @code = code | |
| end | |
| def +(str) | |
| to_str + str | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'Twas the night before Christmas, when all through the racks | |
| Not a server was alerting, not even Compaqs. | |
| The backups were written to tapes with care | |
| In hopes that later the data would be there. | |
| The machines were nestled all snug in their sleds | |
| Whilst visions of vengeance danced in their heads; | |
| And oncall in his three-wolf and I in my rack. | |
| Had just settled down for some syn and some ack. |