This file contains 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
/* | |
* Jenks - A simple and clean theme for the Jenkins continous integration server. | |
* Copyright (c) 2014, Minecrell <https://github.com/Minecrell> | |
* Licensed under the MIT License: http://opensource.org/licenses/MIT | |
*/ | |
@import url(//fonts.googleapis.com/css?family=Open+Sans|Source+Code+Pro); | |
body, table, form, input, td, th, p, textarea, select { | |
font-family: 'Open Sans', sans-serif; |
This file contains 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 | |
/* | |
* Minecraft Color Parser for PHP | |
* Copyright (c) 2013, Minecrell | |
* MIT License: http://opensource.org/licenses/MIT | |
*/ | |
function parseMinecraftColors($string) { | |
$string = utf8_decode(htmlspecialchars($string, ENT_QUOTES, "UTF-8")); | |
$string = preg_replace('/\xA7([0-9a-f])/i', '<span class="mc-color mc-$1">', $string, -1, $count) . str_repeat("</span>", $count); |
This file contains 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
public static Player getPlayerDamager(Entity damager) { | |
if (damager instanceof Player) return (Player) damager; | |
if (damager instanceof Projectile) { | |
Projectile projectile = (Projectile) damager; | |
Object shooter = projectile.getShooter(); // Doesn't really matter but will also make it work with pre 1.7 | |
if (shooter != null && (shooter instanceof Player)) return (Player) shooter; | |
} | |
return null; | |
} |
This file contains 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
public static Entity getLastEntityDamager(Entity entity) { | |
EntityDamageEvent event = entity.getLastDamageCause(); | |
if (event != null && !event.isCancelled() && (event instanceof EntityDamageByEntityEvent)) { | |
Entity damager = ((EntityDamageByEntityEvent) event).getDamager(); | |
if (damager instanceof Projectile) { | |
Object shooter = ((Projectile) damager).getShooter(); | |
if (shooter != null && (shooter instanceof Entity)) return (Entity) shooter; | |
} | |
// Add other special cases if necessary |
This file contains 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
/* | |
* ServerListAPI - API to modify some advanced Minecraft server list data | |
* Copyright (C) 2013 Minecrell | |
* You are not allowed to use this API to fake online players on a production server. | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* |