Skip to content

Instantly share code, notes, and snippets.

View Techcable's full-sized avatar
🇺🇸
Procrastinating

Techcable

🇺🇸
Procrastinating
View GitHub Profile
@Techcable
Techcable / ConcurrentHashMap.java
Last active August 29, 2015 14:17
Version 1.96 of ConcurrentHashMap
/*
* Written by Doug Lea with assistance from members of JCP JSR-166
* Expert Group and released to the public domain, as explained at
* http://creativecommons.org/licenses/publicdomain
*/
package java.util.concurrent;
import java.util.concurrent.locks.*;
import java.util.*;
import java.io.Serializable;
@Techcable
Techcable / NameChanger.java
Last active September 29, 2022 07:11
Change the name of a player using protocollib
/*
* The MIT License
* Copyright (c) 2015 Techcable
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@Techcable
Techcable / ActionBar.java
Last active August 29, 2015 14:17
ActionBarUtils (Requires My Reflection Class)
/*
* The MIT License
* Copyright (c) 2015 Techcable
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@Techcable
Techcable / Reflection.java
Last active August 29, 2015 14:17
Reflection Utilities for Minecraft
/*
* The MIT License
* Copyright (c) 2015 Techcable
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@Techcable
Techcable / PluginLoader.java
Last active August 29, 2015 14:18
PluginLoader (Load a plugin from spigotmc, or bukkit-dev)
import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URL;
import java.net.URLConnection;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
@Techcable
Techcable / CombatGroups.java
Last active August 29, 2015 14:18
CombatGroups (requires Vault)
/*
* The MIT License
* Copyright (c) 2015 Techcable
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@Techcable
Techcable / ConcurrentHashMap.java
Created April 16, 2015 07:21
Java 1.8 java.util.concurrent.ConcurrentHashMap
/*
* Written by Doug Lea with assistance from members of JCP JSR-166
* Expert Group and released to the public domain, as explained at
* http://creativecommons.org/publicdomain/zero/1.0/
*/
package java.util.concurrent;
import java.io.ObjectStreamField;
import java.io.Serializable;
@Techcable
Techcable / applyPatches.sh
Created April 25, 2015 21:28
Recursive Patch (Useful for projects that use MCP)
#!/bin/bash
if [[ $# < 3 ]]
then
echo "Usage: {original dir} {patch dir} {output dir}"
exit
fi
mcpDir=$1
outputDir=$3
@Techcable
Techcable / build.sh
Last active August 29, 2015 14:20
Paper Spigot 1.7.10 Build Tools
GIT_REPO="https://github.com/PaperSpigot/Paper.git"
if which git >/dev/null;
then
echo "Git found";
else
echo "Git not found";
echo "Please install git";
exit 1;
fi;
@Techcable
Techcable / MCPlayerIndex.java
Created May 12, 2015 05:51
MCPlayerIndex java client
/**
* The MIT License (MIT)
*
* Copyright (c) 2015 Techcable
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is