Skip to content

Instantly share code, notes, and snippets.

Minecrell Minecrell

Block or report user

Report or block Minecrell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View build.gradle
plugins {
id 'io.franzbecker.gradle-lombok' version '1.11' apply false
}
allprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'io.franzbecker.gradle-lombok'
buildscript {
View ServerListPing17.java
package de.zh32.slp;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.chat.ComponentSerializer;
import net.md_5.bungee.chat.TextComponentSerializer;
import net.md_5.bungee.chat.TranslatableComponentSerializer;
View keybase.md

Keybase proof

I hereby claim:

  • I am minecrell on github.
  • I am minecrell (https://keybase.io/minecrell) on keybase.
  • I have a public key ASA81GA1xnRYbydc2q18LcPQ6Q5KM3QNmV0t4_kbH9aOlgo

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am minecrell on github.
  • I am minecrell (https://keybase.io/minecrell) on keybase.
  • I have a public key whose fingerprint is 1292 EA3B 5B63 BFEA 3933 73D1 9647 ABA3 E834 C835

To claim this, I am signing this object:

@Minecrell
Minecrell / jenks.css
Last active Jun 11, 2017
Jenks - A simple and clean theme for the Jenkins continous integration server. (Demo: https://ci.minecrell.net)
View jenks.css
/*
* 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;
@Minecrell
Minecrell / Colorize.php
Last active Mar 22, 2019
Minecraft color parser for PHP
View Colorize.php
<?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);
@Minecrell
Minecrell / [Bukkit] PlayerDamager.java
Last active Dec 21, 2015
Get the real player damager behind an entity, for example if an entity was damaged by an arrow.
View [Bukkit] PlayerDamager.java
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;
}
@Minecrell
Minecrell / [Bukkit] EntityKiller.java
Last active Dec 19, 2015
Get the last entity damaged another entity.
View [Bukkit] EntityKiller.java
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
@Minecrell
Minecrell / ServerListAPI.java
Last active Aug 5, 2016
API to modify some advanced Minecraft server list data.
View ServerListAPI.java
/*
* 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.
*
You can’t perform that action at this time.