Skip to content

Instantly share code, notes, and snippets.

View chaseking's full-sized avatar
⛰️

Chase King chaseking

⛰️
View GitHub Profile
package no.jckf.slplib;
import java.io.*;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketException;
import java.nio.charset.Charset;
public final class MinecraftServer {
private String address = "localhost";
@Tzeentchful
Tzeentchful / ScoreboardManager.java
Last active December 15, 2015 03:29
A manager to help with setting up of scoreboards in bukkit.
public class ScoreboardManager {
/**
* Here be dragons! I have done some testing, need to do more.
*
* No comments for you. This was hard to code so it will be hard to read.
* :P i'll add comments when i get time.
*
*/
@aadnk
aadnk / CancellationDetector.java
Last active March 30, 2024 15:23
A class that allows you to detect which plugin cancelled a given event.
package com.comphenix.example;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.Iterator;
import java.util.List;
import org.bukkit.event.Cancellable;
@aadnk
aadnk / Ability.java
Last active December 4, 2018 17:03
A simple cooldown system with charges.
package com.comphenix.example;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.bukkit.entity.Player;
public class Ability {
/**
@hice3000
hice3000 / materials.yml
Created June 26, 2013 15:22
This is just a yaml "library" of minecraft items, written for those who have to translate item ids into english names. If an item has a data value, it is written behind an underscore "_".
1: Stone
2: Grass
3: Dirt
4: Cobblestone
5: Wooden Plank (Oak)
5_1: Wooden Plank (Spruce)
5_2: Wooden Plank (Birch)
5_3: Wooden Plank (Jungle)
6: Sapling (Oak)
6_1: Sapling (Spruce)
@stephan-gh
stephan-gh / ServerListAPI.java
Last active February 29, 2024 20:05
API to modify some advanced Minecraft server list data.
/*
* 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.
*
@aadnk
aadnk / Attributes.java
Last active September 15, 2020 10:13
Edit attributes in 1.6.2 (Not dependent on ProtocolLib). See https://github.com/aadnk/AttributeStorage/tree/nms for 1.7.2.
package com.comphenix.example;
import java.lang.reflect.Field;
import java.util.Iterator;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.ConcurrentMap;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@cnaude
cnaude / get.pl
Last active August 20, 2016 02:48
Parse output from http://forums.bukkit.org/members/?page=$i and sort by number of likes.
#!/usr/bin/perl
use strict;
for my $i (1..16420) {
system("wget -O data/bf.$i.html 'http://forums.bukkit.org/members/?page=$i'");
sleep 2;
}
@aadnk
aadnk / NbtFactory.java
Last active December 29, 2020 04:29
A compact library for editing or creating NBT tags, ready to be inserted into your project. It doesn't directly depend on CraftBukkit, but uses reflection to access it dynamically. Use this version for 1.7.2: http://tinyurl.com/attributestorage
package com.comphenix.example;
import java.io.BufferedInputStream;
import java.io.DataInput;
import java.io.DataInputStream;
import java.io.DataOutput;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@JamesNorris
JamesNorris / Spiraling Effect
Last active December 29, 2015 09:39
The solution to chasechocolates' question on spiraling effects.
How do I make an effect that spirals, becoming smaller as time goes on?
So, as we know a circle is defined by the equation:
r^2 = (x - a)^2 + (y - b)^2
So that gets us the general equation with which we will be working. As a result, we should also know that:
as a->∞ = translation in the x, right
as b->∞ = translation in the y, up