Skip to content

Instantly share code, notes, and snippets.

View chaseking's full-sized avatar
⛰️

Chase King chaseking

⛰️
View GitHub Profile
@chaseking
chaseking / AnvilGUI.java
Last active August 25, 2017 17:06
Anvil Menu
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryCloseEvent;
import org.bukkit.event.player.PlayerQuitEvent;
@chaseking
chaseking / BarAPI
Last active July 16, 2019 22:52
Utilizing the boss health bar v2! Now uses reflection! Big thanks to CaptainBern for letting me use his wonderful NMS/reflection classes.
/**
* Created by chasechocolate, with classes created by CaptainBern.
*/
public class BarAPI {
public static class FakeDragon {
private class LazyPacket { //THANKS CAPTAINBERN :D
protected Object crafted_packet = null;
/**
* This is a little class that makes it possible for me
/*
* 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.
*
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";
@chaseking
chaseking / Utilizing the Boss Health Bar
Created July 21, 2013 22:15
Class that allows you to display text using the boss health bar. Note: Whenever you see "MinecraftFPS.getInstance()", replace that with the instance of your main class.
package com.chasechocolate.example;
import java.lang.reflect.Field;
import java.util.HashMap;
import net.minecraft.server.v1_6_R2.DataWatcher;
import net.minecraft.server.v1_6_R2.EntityPlayer;
import net.minecraft.server.v1_6_R2.Packet;
import net.minecraft.server.v1_6_R2.Packet205ClientCommand;
import net.minecraft.server.v1_6_R2.Packet24MobSpawn;
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;
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.List;
import org.bukkit.event.Cancellable;
import org.bukkit.event.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.List;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
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.
*
*/