Skip to content

Instantly share code, notes, and snippets.

View del.js
// ==UserScript==
// @name DeletedSubmissions
// @namespace com.md_5
// @description Hide those pesky deleted Bukkit submissions
// @include http://forums.bukkit.org/forums/plugin-submissions.20/*
// ==/UserScript==
var threadHolders = document.getElementsByClassName("discussionListItems");
for (var i = 0; i < threadHolders.length; i++) {
var deletedThreads = document.getElementsByClassName("discussionListItem deleted");
View chunk.java
@Override
public byte[][] generateBlockSections(World world, Random random, int x1, int z1, BiomeGrid biomes) {
byte[][] bytes = new byte[16][16 * 16 * 16];
for (int i = 0; i <= 16; i++) {
int index = 0;
for (int x = 0; x <= 16; x++) {
for (int z = 0; z <= 16; z++) {
for (int y = 0; y <= 16; y++) {
bytes[i][index] = 1;
index++;
View minecraft.xml
<?xml version="1.0" encoding="UTF-8"?>
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Name>MinecraftDownload</Name><Prefix/><Marker/><MaxKeys>1000</MaxKeys><IsTruncated>false</IsTruncated><Contents><Key>AppleJavaExtensions.jar</Key><LastModified>2010-09-18T21:35:15.000Z</LastModified><ETag>"5e99d4dd3509fd1cd61c17bda81626a2"</ETag><Size>4189</Size><StorageClass>STANDARD</StorageClass></Contents><Contents><Key>bakup/</Key><LastModified>2011-04-19T13:01:43.000Z</LastModified><ETag>"d41d8cd98f00b204e9800998ecf8427e"</ETag><Size>0</Size><StorageClass>STANDARD</StorageClass></Contents><Contents><Key>bakup/jinput.jar</Key><LastModified>2011-04-19T13:01:50.000Z</LastModified><ETag>"a7835a73a130656aba23e34147a55367"</ETag><Size>227833</Size><StorageClass>STANDARD</StorageClass></Contents><Contents><Key>bakup/jinput.jar.lzma</Key><LastModified>2011-04-19T13:01:57.000Z</LastModified><ETag>"230cb9e4e802a1f4ee00fe32e9df109b"</ETag><Size>203737</Size><StorageClass>STANDARD</StorageClass></Contents><Cont
View DenySpout.java
package com.md_5;
import net.minecraft.server.EntityPlayer;
import net.minecraft.server.NetServerHandler;
import net.minecraft.server.Packet18ArmAnimation;
import org.bukkit.craftbukkit.entity.CraftPlayer;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;
View Commandvanish.java
package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.entity.Player;
public class Commandvanish extends EssentialsCommand
{
public Commandvanish()
View in.java
package com.raphfrk.craftproxylitest;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.bouncycastle.crypto.StreamCipher;
public class CiphOut extends FilterOutputStream {
private StreamCipher ciph;
View in.java
package com.raphfrk.craftproxylitest;
import java.io.FilterInputStream;
import java.io.IOException;
import java.io.InputStream;
import org.bouncycastle.crypto.StreamCipher;
public class CiphIn extends FilterInputStream {
private StreamCipher ciph;
View mcbans.java
package com.raphfrk.craftproxylitest;
import com.google.gson.Gson;
import static com.raphfrk.craftproxylitest.LogManager.$;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.Writer;
import java.net.URL;
import java.net.URLConnection;
View DenySpout.java
package com.md_5;
public class DenySpout extends org.bukkit.plugin.java.JavaPlugin implements org.bukkit.event.Listener {
@Override
public void onEnable() {
try {
Class<?>[] params = {int.class, boolean.class, boolean.class, Class.class};
java.lang.reflect.Method addClassMapping = net.minecraft.server.Packet.class.getDeclaredMethod("a", params);
addClassMapping.setAccessible(true);
View lookup.java
try {
String[] split = ip.split("\\.");
StringBuilder lookup = new StringBuilder();
for (int i = split.length - 1; i >= 0; i--) {
lookup.append(split[i]);
lookup.append(".");
}
lookup.append("xbl.spamhaus.org.");
if (java.net.InetAddress.getByName(lookup.toString()) != null) {
return "Your IP address is flagged as unsafe by spamhaus.org/xbl";