Skip to content

Instantly share code, notes, and snippets.

View Bukkit Holograms
public class Hologram {
private static final double distance = 0.25;
private List<String> lines = new ArrayList<String>();
private List<Integer> ids = new ArrayList<Integer>();
private boolean showing = false;
private Location location;
public Hologram(String... lines) {
this.lines.addAll(Arrays.asList(lines));
@PaulBGD
PaulBGD / JSONTidier.java
Created Aug 18, 2014
Tidies up a JSON string in Java
View JSONTidier.java
package me.paulbgd.bgdcore.json;
public class JSONTidier {
private static final String tab = "\t";
private static final String line = "\n";
public static String tidyJSON(String json) {
StringBuilder string = new StringBuilder();
int tabCount = 0;
@PaulBGD
PaulBGD / JSONTidier.java
Created Aug 18, 2014
Tidies up a JSON string in pure java.
View JSONTidier.java
package me.paulbgd.bgdcore.json;
public class JSONTidier {
private static final String tab = "\t";
private static final String line = "\n";
public static String tidyJSON(String json) {
StringBuilder string = new StringBuilder();
int tabCount = 0;
View keybase.md

Keybase proof

I hereby claim:

  • I am PaulBGD on github.
  • I am paulbgd (https://keybase.io/paulbgd) on keybase.
  • I have a public key whose fingerprint is 660B 9BC1 3C2B C174 3A5A D16D 9692 73F3 DD96 15FE

To claim this, I am signing this object:

View ChunkProviderServerHook.java
/**
* @author PaulBGD
*/
public class ChunkProviderServerHook extends ChunkProviderServer {
@Setter
private static int distance = FactionConfiguration.getConfiguration().spawnProtection;
public ChunkProviderServerHook(WorldServer worldserver, IChunkLoader ichunkloader, IChunkProvider ichunkprovider) {
super(worldserver, ichunkloader, ichunkprovider);
@PaulBGD
PaulBGD / Ping.java
Created May 11, 2015
Find CraftPlayer ping
View Ping.java
private static Class<?> craftPlayerClass;
private static Method getHandleMethod;
private static Field pingField;
private int getPing(Player player) {
if (player.getClass().getSimpleName().equals("CraftPlayer")) {
if (craftPlayerClass == null) {
craftPlayerClass = player.getClass();
}
if (getHandleMethod == null) {
@PaulBGD
PaulBGD / noadblock.js
Created Jun 20, 2015
Check if someone is using adblock
View noadblock.js
setTimeout(function() {
var adsbygoogle = document.getElementsByClassName('adsbygoogle');
if (adsbygoogle && adsbygoogle.length > 0 && adsbygoogle[0].childNodes.length == 0) {
console.log('Please turn off adblock!');
}
}, 1000);
View Implementations.java
import lombok.Data;
import org.apache.commons.lang3.Validate;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
/**
* @author PaulBGD
*/
@PaulBGD
PaulBGD / gist:4a637a871b8e0a67e967
Created Jul 16, 2015
Put this in your address bar to head to Chester's Skype
View gist:4a637a871b8e0a67e967
Chester is currently too busy to handle your request. Check out this dedicated Skype room!
skype:?chat&blob=DwqHBv-h_KtVeIuYMHt_7265uibJE7tUv9v2q_VIafmSxI7kJye06V0pk4qQxzo-ZXDDWkEF3A
@PaulBGD
PaulBGD / README.md
Last active Sep 27, 2015
CaaS README
View README.md

CaaS - Chester as a Service

Pricing

Limit pricing

This pricing is for raising the rate limit to the main chester brain.

  • $2.50/month - rate limit is raised to 5,000 questions per hour
  • $5.00/month - rate limit is raised to 10,000 questions per hour