Skip to content

Instantly share code, notes, and snippets.

View FarisR99's full-sized avatar

Faris FarisR99

  • Goldman Sachs
  • London, UK
View GitHub Profile
@FarisR99
FarisR99 / UUIDApi.java
Created April 21, 2014 13:41
UUIDApi - Mineskin
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.UUID;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
public class UUIDApi {
private static final String API_LINK_PLAYER = "http://mineskin.ca/name/?uuid=";
@FarisR99
FarisR99 / Commandcondense.java
Last active August 29, 2015 14:01 — forked from khobbits/condense.java
Made the SimpleRecipe global if required.
package com.earth2me.essentials.commands;
import com.earth2me.essentials.ChargeException;
import com.earth2me.essentials.Trade;
import com.earth2me.essentials.Trade.OverflowType;
import com.earth2me.essentials.User;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
@FarisR99
FarisR99 / UUIDApi.java
Last active August 29, 2015 14:01
Bukkit UUIDApi v1.0.2 - MineSkin
import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
@FarisR99
FarisR99 / ItemSerialization.java
Last active August 29, 2015 14:02 — forked from aadnk/ItemSerialization.java
Serialize items and inventories.
package com.comphenix.example;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInput;
import java.io.DataInputStream;
import java.io.DataOutput;
import java.io.DataOutputStream;
import java.lang.reflect.Method;
import java.util.Arrays;
@FarisR99
FarisR99 / Main.java
Last active August 29, 2015 14:04
UK Mini-Game
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class Main {
public static void main(String[] args) {
final Random random = new Random();
Country country = new Country("United Kingdom", random.nextInt() - 300, random.nextInt() - 1000, 300, 1000);
country.addCity(new City("London", 250, 900));
country.addCity(new City("Manchester", 10, 500));
@FarisR99
FarisR99 / SystemOverride.java
Last active August 29, 2015 14:04
MCSGBot bypass
import java.awt.*;
import java.awt.event.KeyEvent;
public class SystemOverride implements Runnable {
public static void main(String[] args) {
System.out.println("Launched SystemOverride.");
SystemOverride systemOverride = new SystemOverride();
systemOverride.start();
systemOverride.typeKeys("/leave");
systemOverride.pressKey(KeyEvent.VK_ENTER);
@FarisR99
FarisR99 / Main.java
Last active August 29, 2015 14:04
MCSG Bot Extended Commands
import java.util.*;
public class Main {
public static void main(String[] args) {
System.out.println("Starting MCSG Bot Extended Commands...");
final Main main = new Main();
System.out.println("Started MCSG Bot Extended Commands by KingFaris10");
main.readCommand();
}
@FarisR99
FarisR99 / ReadScript.java
Last active August 29, 2015 14:04
OPMCSGBot
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
public class ReadScript {
public static void main(String[] args) {
new ReadScript();
}
@FarisR99
FarisR99 / CustomMap.java
Last active August 29, 2015 14:04
CustomMap
import java.util.*;
public class CustomMap<K, V> implements Cloneable {
private List<K> keys = null;
private List<V> values = null;
public CustomMap() {
this.keys = new ArrayList<K>();
this.values = new ArrayList<V>();
@FarisR99
FarisR99 / Lang.java
Last active August 29, 2015 14:04
Custom Lang - thanks to 1Rogue for a base idea
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.File;
public enum Lang {
PREFIX("Prefix.Plugin", "&6[&4<plugin>&6] &a"), COMMAND_NO_PERMISSION("Command.No permission", "&4You do not have access to that command."), COMMAND_PLAYER("Command.Player", "&cYou must be a player to use that command.");