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
import java.util.HashMap; | |
import java.util.Iterator; | |
import java.util.Map; | |
import java.util.Set; | |
import java.util.concurrent.ConcurrentHashMap; | |
import org.bukkit.event.Event; | |
import org.bukkit.event.EventHandler; | |
import org.bukkit.event.Listener; |
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
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
import java.net.UnknownHostException; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.UUID; |
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
/** | |
* A quick enum for getting the amount of slots in an inventory row. | |
* Used to prevent illegal arguments when creating an inventory. | |
* | |
* @author Justis | |
* | |
*/ | |
public enum Rows { |
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
// Created by Lawrence PC Dol. Released into the public domain. | |
// http://tech.dolhub.com | |
// | |
// Contributions by Carlos Gómez of Asturias, Spain, in the area of unary operators | |
// and right-to-left evaluations proved invaluable to implementing these features. | |
// Thanks Carlos! | |
// | |
// Source is licensed for any use, provided this copyright notice is retained. | |
// No warranty for any purpose whatsoever is implied or expressed. The author |
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
//Created by Justis Root. Released into the public domain. | |
//https://gist.github.com/justisr | |
// | |
//Source is licensed for any use, provided that this copyright notice is retained. | |
//Modifications not expressly accepted by the author should be noted in the license of any forks. | |
//No warranty for any purpose whatsoever is implied or expressed, | |
//and the author shall not be held liable for any losses, direct or indirect as a result of using this software. | |
import java.io.File; |
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
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import org.bukkit.ChatColor; | |
import org.bukkit.entity.Player; | |
import com.gmail.justisroot.autoecon.data.ServerSpecs; |
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
@EventHandler | |
public void brew(BrewEvent e) { | |
ItemStack[] contents = e.getContents().getContents(); | |
for (int i = 2; i >= 0; i--) { | |
PotionType type = result(contents[i], contents[3]); | |
if (type == null) continue; | |
} | |
} | |
private static PotionType result(ItemStack potion, ItemStack ing) { |
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
import java.io.ByteArrayOutputStream; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.Map; | |
import java.util.Set; | |
import java.util.UUID; |
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
import org.bukkit.Material; | |
import org.bukkit.inventory.ItemStack; | |
public enum Pane { | |
WHITE(0), | |
ORANGE(1), | |
LIGHT_PURPLE(2), | |
LIGHT_BLUE(3), | |
YELLOW(4), | |
LIGHT_GREEN(5), |
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
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.regex.Pattern; | |
public enum TimeUnit { | |
SEC("second", 1, 's'), | |
MIN("minute", 60, 'm'), | |
HOUR("hour", 3600, 'h'), |