diff --git a/Bukkit-Patches/0006-Add-Particle-API.patch b/Bukkit-Patches/0006-Add-Particle-API.patch index 61158f9dfa..bb75e8a3e0 100644 --- a/Bukkit-Patches/0006-Add-Particle-API.patch +++ b/Bukkit-Patches/0006-Add-Particle-API.patch @@ -147,6 +147,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + HAPPY_VILLAGER("happyVillager", Type.PARTICLE), + /** ++ * The smoke particles that appears on blazes, minecarts ++ * with furnaces and fire ++ */ ++ LARGE_SMOKE("largesmoke", Type.PARTICLE), ++ /** + * The particles generated when a tool breaks. + * This particle requires a Material so that the client can select the correct texture. + */ diff --git a/Bukkit-Patches/0027-Ease-ClassLoader-Deadlocks-Where-Possible.patch b/Bukkit-Patches/0027-Ease-ClassLoader-Deadlocks-Where-Possible.patch index 4cf0bd68d3..32c497448e 100644 --- a/Bukkit-Patches/0027-Ease-ClassLoader-Deadlocks-Where-Possible.patch +++ b/Bukkit-Patches/0027-Ease-ClassLoader-Deadlocks-Where-Possible.patch @@ -49,6 +49,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + method.setAccessible( oldAccessible ); + org.bukkit.Bukkit.getLogger().log( java.util.logging.Level.INFO, "Set PluginClassLoader as parallel capable" ); + } ++ } catch ( NoSuchMethodException ex ) ++ { ++ // Ignore + } catch ( Exception ex ) + { + org.bukkit.Bukkit.getLogger().log( java.util.logging.Level.WARNING, "Error setting PluginClassLoader as parallel capable", ex ); diff --git a/Bukkit-Patches/0029-Undeprecate-Player-updateInventory-V.patch b/Bukkit-Patches/0029-Undeprecate-Player-updateInventory-V.patch new file mode 100644 index 0000000000..c7ba2c0815 --- /dev/null +++ b/Bukkit-Patches/0029-Undeprecate-Player-updateInventory-V.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: drXor +Date: Wed, 23 Jul 2014 15:50:36 -0400 +Subject: [PATCH] Undeprecate Player#updateInventory()V + + +diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/entity/Player.java ++++ b/src/main/java/org/bukkit/entity/Player.java +@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline + /** + * Forces an update of the player's entire inventory. + * +- * @deprecated This method should not be relied upon as it is a temporary +- * work-around for a larger, more complicated issue. + */ +- @Deprecated ++ //@Deprecated // Spigot - undeprecate + public void updateInventory(); + + /** +-- \ No newline at end of file diff --git a/CraftBukkit-Patches/0002-mc-dev-imports.patch b/CraftBukkit-Patches/0002-mc-dev-imports.patch index 4553c4f9dc..73ee417171 100644 --- a/CraftBukkit-Patches/0002-mc-dev-imports.patch +++ b/CraftBukkit-Patches/0002-mc-dev-imports.patch @@ -5,6 +5,24 @@ Subject: [PATCH] mc-dev imports Imported files which are only modified by Spigot, not upstream. Files here should be completely unmodified aside from trivial changes such as adding throws statements to ensure proper compilation. You may need to add unrelated files in order to ensure a compilable result in the face of synthetic methods. +diff --git a/pom.xml b/pom.xml +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -0,0 +0,0 @@ + 1.3 + test + ++ ++ org.spigotmc ++ sneaky-throw ++ 1.0 ++ system ++ ${project.basedir}/../SneakyThrow.jar ++ + + + diff --git a/src/main/java/net/minecraft/server/BanEntrySerializer.java b/src/main/java/net/minecraft/server/BanEntrySerializer.java new file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 @@ -1604,6 +1622,144 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return this.toString(); + } +} +diff --git a/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java b/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java +new file mode 100644 +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 +--- /dev/null ++++ b/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java +@@ -0,0 +0,0 @@ ++package net.minecraft.server; ++ ++import java.io.BufferedInputStream; ++import java.io.BufferedOutputStream; ++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.io.IOException; ++import java.io.InputStream; ++import java.io.OutputStream; ++import java.util.zip.GZIPInputStream; ++import java.util.zip.GZIPOutputStream; ++ ++public class NBTCompressedStreamTools { ++ ++ public static NBTTagCompound a(InputStream inputstream) { ++ try { ++ DataInputStream datainputstream = new DataInputStream(new BufferedInputStream(new GZIPInputStream(inputstream))); ++ ++ NBTTagCompound nbttagcompound; ++ ++ try { ++ nbttagcompound = a((DataInput) datainputstream, NBTReadLimiter.a); ++ } finally { ++ datainputstream.close(); ++ } ++ ++ return nbttagcompound; ++ } catch (IOException ex) { org.spigotmc.SneakyThrow.sneaky( ex ); } return null; ++ } ++ ++ public static void a(NBTTagCompound nbttagcompound, OutputStream outputstream) { ++ try { ++ DataOutputStream dataoutputstream = new DataOutputStream(new BufferedOutputStream(new GZIPOutputStream(outputstream))); ++ ++ try { ++ a(nbttagcompound, (DataOutput) dataoutputstream); ++ } finally { ++ dataoutputstream.close(); ++ } ++ } catch (IOException ex) { org.spigotmc.SneakyThrow.sneaky( ex ); } ++ } ++ ++ public static NBTTagCompound a(byte[] abyte, NBTReadLimiter nbtreadlimiter) { ++ try { ++ DataInputStream datainputstream = new DataInputStream(new BufferedInputStream(new GZIPInputStream(new ByteArrayInputStream(abyte)))); ++ ++ NBTTagCompound nbttagcompound; ++ ++ try { ++ nbttagcompound = a((DataInput) datainputstream, nbtreadlimiter); ++ } finally { ++ datainputstream.close(); ++ } ++ ++ return nbttagcompound; ++ } catch (IOException ex) { org.spigotmc.SneakyThrow.sneaky( ex ); } return null; ++ } ++ ++ public static byte[] a(NBTTagCompound nbttagcompound) { ++ try { ++ ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream(); ++ DataOutputStream dataoutputstream = new DataOutputStream(new GZIPOutputStream(bytearrayoutputstream)); ++ ++ try { ++ a(nbttagcompound, (DataOutput) dataoutputstream); ++ } finally { ++ dataoutputstream.close(); ++ } ++ ++ return bytearrayoutputstream.toByteArray(); ++ } catch (IOException ex) { org.spigotmc.SneakyThrow.sneaky( ex ); } return null; ++ } ++ ++ public static NBTTagCompound a(DataInputStream datainputstream) { ++ return a((DataInput) datainputstream, NBTReadLimiter.a); ++ } ++ ++ public static NBTTagCompound a(DataInput datainput, NBTReadLimiter nbtreadlimiter) { ++ try { ++ NBTBase nbtbase = a(datainput, 0, nbtreadlimiter); ++ ++ if (nbtbase instanceof NBTTagCompound) { ++ return (NBTTagCompound) nbtbase; ++ } else { ++ throw new IOException("Root tag must be a named compound tag"); ++ } ++ } catch (IOException ex) { org.spigotmc.SneakyThrow.sneaky( ex ); } return null; ++ } ++ ++ public static void a(NBTTagCompound nbttagcompound, DataOutput dataoutput) { ++ a((NBTBase) nbttagcompound, dataoutput); ++ } ++ ++ private static void a(NBTBase nbtbase, DataOutput dataoutput) { ++ try { ++ dataoutput.writeByte(nbtbase.getTypeId()); ++ if (nbtbase.getTypeId() != 0) { ++ dataoutput.writeUTF(""); ++ nbtbase.write(dataoutput); ++ } ++ } catch (IOException ex) { org.spigotmc.SneakyThrow.sneaky( ex ); } ++ } ++ ++ private static NBTBase a(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) { ++ try { ++ byte b0 = datainput.readByte(); ++ ++ if (b0 == 0) { ++ return new NBTTagEnd(); ++ } else { ++ datainput.readUTF(); ++ NBTBase nbtbase = NBTBase.createTag(b0); ++ ++ try { ++ nbtbase.load(datainput, i, nbtreadlimiter); ++ return nbtbase; ++ } catch (IOException ioexception) { ++ CrashReport crashreport = CrashReport.a(ioexception, "Loading NBT data"); ++ CrashReportSystemDetails crashreportsystemdetails = crashreport.a("NBT Tag"); ++ ++ crashreportsystemdetails.a("Tag name", "[UNNAMED TAG]"); ++ crashreportsystemdetails.a("Tag type", Byte.valueOf(b0)); ++ throw new ReportedException(crashreport); ++ } ++ } ++ } catch (IOException ex) { org.spigotmc.SneakyThrow.sneaky( ex ); } return null; ++ } ++} diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java new file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 @@ -3706,4 +3862,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return new WorldGenVillageStart(this.c, this.b, i, j, this.f); + } +} +diff --git a/src/main/resources/org/spigotmc/SneakyThrow.class b/src/main/resources/org/spigotmc/SneakyThrow.class +new file mode 100644 +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 +GIT binary patch +literal 184 +zcmX^0Z`VEsW(HjbE=C64;Jnnt?8=agqWp5bEOrKVMh1bb#Ii*FoW#6zegCAa)Z`LI +z2Cm@z(xT*4x6GVWMg|t={1hN1q2Ys22-csNl#^<$83vTfFG|-hF33#JFUd{TN3wyD +ufvp&9A3M-~MFu7YP6iNQ1kxM~Y(Sb7$m0Xjj6j-6Yd=U5$YufY7#IQ5^(s;T + +literal 0 +HcmV?d00001 + -- \ No newline at end of file diff --git a/CraftBukkit-Patches/0005-Spigot-Configuration.patch b/CraftBukkit-Patches/0005-Spigot-Configuration.patch index 8ee58e39e2..91013e6c70 100644 --- a/CraftBukkit-Patches/0005-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0005-Spigot-Configuration.patch @@ -231,6 +231,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + config.addDefault( path, def ); + return config.getString( path, config.getString( path ) ); + } ++ ++ private static double getDouble(String path, double def) ++ { ++ config.addDefault( path, def ); ++ return config.getDouble( path, config.getDouble( path ) ); ++ } +} diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java new file mode 100644 diff --git a/CraftBukkit-Patches/0018-PlayerItemDamageEvent.patch b/CraftBukkit-Patches/0018-PlayerItemDamageEvent.patch index dcfd0b823c..553a2b7ffa 100644 --- a/CraftBukkit-Patches/0018-PlayerItemDamageEvent.patch +++ b/CraftBukkit-Patches/0018-PlayerItemDamageEvent.patch @@ -40,4 +40,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return false; } } +@@ -0,0 +0,0 @@ public final class ItemStack { + public void damage(int i, EntityLiving entityliving) { + if (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.canInstantlyBuild) { + if (this.g()) { +- if (this.isDamaged(i, entityliving.aI())) { ++ if (this.isDamaged(i, entityliving.aI(), entityliving)) { // Spigot + entityliving.a(this); + --this.count; + if (entityliving instanceof EntityHuman) { -- \ No newline at end of file diff --git a/CraftBukkit-Patches/0032-Allow-Disabling-of-Command-Logging.patch b/CraftBukkit-Patches/0032-Allow-Disabling-of-Command-Logging.patch index 4c24059c0c..c540b84116 100644 --- a/CraftBukkit-Patches/0032-Allow-Disabling-of-Command-Logging.patch +++ b/CraftBukkit-Patches/0032-Allow-Disabling-of-Command-Logging.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: md_5 -Date: Fri, 21 Jun 2013 18:01:29 +1000 +From: Zach Brown <1254957+zachbr@users.noreply.github.com> +Date: Sun, 27 Jul 2014 14:12:17 -0500 Subject: [PATCH] Allow Disabling of Command Logging @@ -22,14 +22,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -0,0 +0,0 @@ public class SpigotConfig - config.addDefault( path, def ); - return config.getString( path, config.getString( path ) ); - } + + private static double getDouble(String path, double def) + { +- config.addDefault( path, def ); +- return config.getDouble( path, config.getDouble( path ) ); ++ config.addDefault(path, def); ++ return config.getDouble(path, config.getDouble(path)); ++ } + + public static boolean logCommands; + private static void logCommands() + { + logCommands = getBoolean( "commands.log", true ); -+ } + } } -- \ No newline at end of file diff --git a/CraftBukkit-Patches/0133-Convert-player-skulls-async.patch b/CraftBukkit-Patches/0133-Convert-player-skulls-async.patch index a82d837f3d..3f8e4a2177 100644 --- a/CraftBukkit-Patches/0133-Convert-player-skulls-async.patch +++ b/CraftBukkit-Patches/0133-Convert-player-skulls-async.patch @@ -4,6 +4,80 @@ Date: Sun, 20 Apr 2014 13:18:55 +0100 Subject: [PATCH] Convert player skulls async +diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/ItemStack.java ++++ b/src/main/java/net/minecraft/server/ItemStack.java +@@ -0,0 +0,0 @@ public final class ItemStack { + if (nbttagcompound.hasKeyOfType("tag", 10)) { + // CraftBukkit - make defensive copy as this data may be coming from the save thread + this.tag = (NBTTagCompound) nbttagcompound.getCompound("tag").clone(); ++ validateSkullSkin(); // Spigot + } + } + ++ // Spigot start - make sure the tag is given the full gameprofile if it's a skull (async lookup) ++ public void validateSkullSkin() ++ { ++ if ( this.item == Items.SKULL && this.getData() == 3 ) ++ { ++ String owner; ++ if ( this.tag.hasKeyOfType( "SkullOwner", 8 ) ) ++ { ++ owner = this.tag.getString( "SkullOwner" ); ++ } else if ( this.tag.hasKeyOfType( "SkullOwner", 10 ) ) ++ { ++ net.minecraft.util.com.mojang.authlib.GameProfile profile = GameProfileSerializer.deserialize( this.tag.getCompound( "SkullOwner" ) ); ++ if ( profile == null || !profile.getProperties().isEmpty() ) ++ { ++ return; ++ } else ++ { ++ owner = profile.getName(); ++ } ++ } else ++ { ++ return; ++ } ++ ++ final String finalOwner = owner; ++ TileEntitySkull.executor.execute( new Runnable() ++ { ++ @Override ++ public void run() ++ { ++ ++ final net.minecraft.util.com.mojang.authlib.GameProfile profile = TileEntitySkull.skinCache.getUnchecked( finalOwner.toLowerCase() ); ++ if ( profile != null ) ++ { ++ MinecraftServer.getServer().processQueue.add( new Runnable() ++ { ++ @Override ++ public void run() ++ { ++ NBTTagCompound nbtProfile = new NBTTagCompound(); ++ GameProfileSerializer.serialize( nbtProfile, profile ); ++ ItemStack.this.tag.set( "SkullOwner", nbtProfile ); ++ } ++ } ); ++ } ++ } ++ } ); ++ } ++ } ++ // Spigot end ++ + public int getMaxStackSize() { + return this.getItem().getMaxStackSize(); + } +@@ -0,0 +0,0 @@ public final class ItemStack { + + public void setTag(NBTTagCompound nbttagcompound) { + this.tag = nbttagcompound; ++ validateSkullSkin(); // Spigot + } + + public String getName() { diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/TileEntitySkull.java @@ -30,12 +104,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private int i; private GameProfile j = null; + // Spigot start -+ private static final Executor executor = Executors.newFixedThreadPool(3, ++ public static final Executor executor = Executors.newFixedThreadPool(3, + new ThreadFactoryBuilder() + .setNameFormat("Head Conversion Thread - %1$d") + .build() + ); -+ private static final Cache skinCache = CacheBuilder.newBuilder() ++ public static final Cache skinCache = CacheBuilder.newBuilder() + .maximumSize( 5000 ) + .expireAfterAccess( 60, TimeUnit.MINUTES ) + .build( new CacheLoader() @@ -120,4 +194,50 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } } } +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +@@ -0,0 +0,0 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { + } + + @Override +- void applyToItem(NBTTagCompound tag) { ++ void applyToItem(final NBTTagCompound tag) { // Spigot - make final + super.applyToItem(tag); + + if (hasOwner()) { + NBTTagCompound owner = new NBTTagCompound(); + GameProfileSerializer.serialize(owner, profile); +- tag.set(SKULL_OWNER.NBT, owner); ++ tag.set( SKULL_OWNER.NBT, owner ); ++ // Spigot start - do an async lookup of the profile. ++ // Unfortunately there is not way to refresh the holding ++ // inventory, so that responsibility is left to the user. ++ net.minecraft.server.TileEntitySkull.executor.execute( new Runnable() ++ { ++ @Override ++ public void run() ++ { ++ ++ final GameProfile profile = net.minecraft.server.TileEntitySkull.skinCache.getUnchecked( CraftMetaSkull.this.profile.getName().toLowerCase() ); ++ if ( profile != null ) ++ { ++ MinecraftServer.getServer().processQueue.add( new Runnable() ++ { ++ @Override ++ public void run() ++ { ++ NBTTagCompound owner = new NBTTagCompound(); ++ GameProfileSerializer.serialize( owner, profile ); ++ tag.set( SKULL_OWNER.NBT, owner ); ++ } ++ } ); ++ } ++ } ++ } ); ++ // Spigot end + } + } + -- \ No newline at end of file diff --git a/CraftBukkit-Patches/0145-Fix-explosions-not-moving-invulnerable-entities.patch b/CraftBukkit-Patches/0144-Fix-explosions-not-moving-invulnerable-entities.patch similarity index 100% rename from CraftBukkit-Patches/0145-Fix-explosions-not-moving-invulnerable-entities.patch rename to CraftBukkit-Patches/0144-Fix-explosions-not-moving-invulnerable-entities.patch diff --git a/CraftBukkit-Patches/0146-Add-damager-to-the-unhandled-error.patch b/CraftBukkit-Patches/0145-Add-damager-to-the-unhandled-error.patch similarity index 100% rename from CraftBukkit-Patches/0146-Add-damager-to-the-unhandled-error.patch rename to CraftBukkit-Patches/0145-Add-damager-to-the-unhandled-error.patch diff --git a/CraftBukkit-Patches/0147-Fix-ItemFrame-and-Fireball-EntityDamageByEntityEvent.patch b/CraftBukkit-Patches/0146-Fix-ItemFrame-and-Fireball-EntityDamageByEntityEvent.patch similarity index 100% rename from CraftBukkit-Patches/0147-Fix-ItemFrame-and-Fireball-EntityDamageByEntityEvent.patch rename to CraftBukkit-Patches/0146-Fix-ItemFrame-and-Fireball-EntityDamageByEntityEvent.patch diff --git a/CraftBukkit-Patches/0148-Cross-World-Entity-Teleportation.patch b/CraftBukkit-Patches/0147-Cross-World-Entity-Teleportation.patch similarity index 100% rename from CraftBukkit-Patches/0148-Cross-World-Entity-Teleportation.patch rename to CraftBukkit-Patches/0147-Cross-World-Entity-Teleportation.patch diff --git a/CraftBukkit-Patches/0149-Limit-block-placement-interaction-packets.patch b/CraftBukkit-Patches/0148-Limit-block-placement-interaction-packets.patch similarity index 100% rename from CraftBukkit-Patches/0149-Limit-block-placement-interaction-packets.patch rename to CraftBukkit-Patches/0148-Limit-block-placement-interaction-packets.patch diff --git a/CraftBukkit-Patches/0150-Better-item-validation.patch b/CraftBukkit-Patches/0149-Better-item-validation.patch similarity index 100% rename from CraftBukkit-Patches/0150-Better-item-validation.patch rename to CraftBukkit-Patches/0149-Better-item-validation.patch diff --git a/CraftBukkit-Patches/0151-Further-Seed-Customisation.patch b/CraftBukkit-Patches/0150-Further-Seed-Customisation.patch similarity index 100% rename from CraftBukkit-Patches/0151-Further-Seed-Customisation.patch rename to CraftBukkit-Patches/0150-Further-Seed-Customisation.patch diff --git a/CraftBukkit-Patches/0152-Disable-ResourceLeakDetector.patch b/CraftBukkit-Patches/0151-Disable-ResourceLeakDetector.patch similarity index 100% rename from CraftBukkit-Patches/0152-Disable-ResourceLeakDetector.patch rename to CraftBukkit-Patches/0151-Disable-ResourceLeakDetector.patch diff --git a/CraftBukkit-Patches/0153-Add-More-Information-to-session.lock-Errors.patch b/CraftBukkit-Patches/0152-Add-More-Information-to-session.lock-Errors.patch similarity index 100% rename from CraftBukkit-Patches/0153-Add-More-Information-to-session.lock-Errors.patch rename to CraftBukkit-Patches/0152-Add-More-Information-to-session.lock-Errors.patch diff --git a/CraftBukkit-Patches/0154-Safer-JSON-Loading.patch b/CraftBukkit-Patches/0153-Safer-JSON-Loading.patch similarity index 100% rename from CraftBukkit-Patches/0154-Safer-JSON-Loading.patch rename to CraftBukkit-Patches/0153-Safer-JSON-Loading.patch diff --git a/CraftBukkit-Patches/0155-Fix-Slow-Loading-Libraries.patch b/CraftBukkit-Patches/0154-Fix-Slow-Loading-Libraries.patch similarity index 100% rename from CraftBukkit-Patches/0155-Fix-Slow-Loading-Libraries.patch rename to CraftBukkit-Patches/0154-Fix-Slow-Loading-Libraries.patch diff --git a/CraftBukkit-Patches/0156-Add-CommandLine-EULA-Flag.patch b/CraftBukkit-Patches/0155-Add-CommandLine-EULA-Flag.patch similarity index 100% rename from CraftBukkit-Patches/0156-Add-CommandLine-EULA-Flag.patch rename to CraftBukkit-Patches/0155-Add-CommandLine-EULA-Flag.patch diff --git a/CraftBukkit-Patches/0157-Fix-misnamed-function-from-1.7.10-update.patch b/CraftBukkit-Patches/0156-Fix-misnamed-function-from-1.7.10-update.patch similarity index 100% rename from CraftBukkit-Patches/0157-Fix-misnamed-function-from-1.7.10-update.patch rename to CraftBukkit-Patches/0156-Fix-misnamed-function-from-1.7.10-update.patch diff --git a/CraftBukkit-Patches/0158-Fix-for-enchanting-table-wiping-meta-when-placing-st.patch b/CraftBukkit-Patches/0157-Fix-for-enchanting-table-wiping-meta-when-placing-st.patch similarity index 100% rename from CraftBukkit-Patches/0158-Fix-for-enchanting-table-wiping-meta-when-placing-st.patch rename to CraftBukkit-Patches/0157-Fix-for-enchanting-table-wiping-meta-when-placing-st.patch diff --git a/CraftBukkit-Patches/0159-Don-t-spawn-bonus-ocelots-when-plugins-spawn-ocelots.patch b/CraftBukkit-Patches/0158-Don-t-spawn-bonus-ocelots-when-plugins-spawn-ocelots.patch similarity index 100% rename from CraftBukkit-Patches/0159-Don-t-spawn-bonus-ocelots-when-plugins-spawn-ocelots.patch rename to CraftBukkit-Patches/0158-Don-t-spawn-bonus-ocelots-when-plugins-spawn-ocelots.patch diff --git a/CraftBukkit-Patches/0160-Prevent-a-crash-involving-attributes.patch b/CraftBukkit-Patches/0159-Prevent-a-crash-involving-attributes.patch similarity index 100% rename from CraftBukkit-Patches/0160-Prevent-a-crash-involving-attributes.patch rename to CraftBukkit-Patches/0159-Prevent-a-crash-involving-attributes.patch diff --git a/CraftBukkit-Patches/0161-Fix-IP-banning.patch b/CraftBukkit-Patches/0160-Fix-IP-banning.patch similarity index 100% rename from CraftBukkit-Patches/0161-Fix-IP-banning.patch rename to CraftBukkit-Patches/0160-Fix-IP-banning.patch diff --git a/CraftBukkit-Patches/0162-Make-moved-wrongly-limit-configurable.patch b/CraftBukkit-Patches/0161-Make-moved-wrongly-limit-configurable.patch similarity index 90% rename from CraftBukkit-Patches/0162-Make-moved-wrongly-limit-configurable.patch rename to CraftBukkit-Patches/0161-Make-moved-wrongly-limit-configurable.patch index 5ce1d4aa90..39d2d56734 100644 --- a/CraftBukkit-Patches/0162-Make-moved-wrongly-limit-configurable.patch +++ b/CraftBukkit-Patches/0161-Make-moved-wrongly-limit-configurable.patch @@ -27,12 +27,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 intCacheLimit = getInt( "settings.int-cache-limit", 1024 ); } + -+ private static double getDouble(String path, double def) -+ { -+ config.addDefault( path, def ); -+ return config.getDouble( path, config.getDouble( path ) ); -+ } -+ + public static double movedWronglyThreshold; + private static void movedWronglyThreshold() + { diff --git a/CraftBukkit-Patches/0163-Fix-Null-Tile-Entity-Worlds.patch b/CraftBukkit-Patches/0162-Fix-Null-Tile-Entity-Worlds.patch similarity index 100% rename from CraftBukkit-Patches/0163-Fix-Null-Tile-Entity-Worlds.patch rename to CraftBukkit-Patches/0162-Fix-Null-Tile-Entity-Worlds.patch diff --git a/CraftBukkit-Patches/0163-Make-moved-too-quickly-limit-configurable.patch b/CraftBukkit-Patches/0163-Make-moved-too-quickly-limit-configurable.patch new file mode 100644 index 0000000000..4c72fec326 --- /dev/null +++ b/CraftBukkit-Patches/0163-Make-moved-too-quickly-limit-configurable.patch @@ -0,0 +1,36 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jonas Konrad +Date: Tue, 22 Jul 2014 15:59:01 +0200 +Subject: [PATCH] Make "moved too quickly" limit configurable + + +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketPlayInListener { + // CraftBukkit end + double d10 = d7 * d7 + d8 * d8 + d9 * d9; + +- if (d10 > 100.0D && this.checkMovement && (!this.minecraftServer.N() || !this.minecraftServer.M().equals(this.player.getName()))) { // CraftBukkit - Added this.checkMovement condition to solve this check being triggered by teleports ++ // Spigot: make "moved too quickly" limit configurable ++ if (d10 > org.spigotmc.SpigotConfig.movedTooQuicklyThreshold && this.checkMovement && (!this.minecraftServer.N() || !this.minecraftServer.M().equals(this.player.getName()))) { // CraftBukkit - Added this.checkMovement condition to solve this check being triggered by teleports + c.warn(this.player.getName() + " moved too quickly! " + d4 + "," + d5 + "," + d6 + " (" + d7 + ", " + d8 + ", " + d9 + ")"); + this.a(this.y, this.z, this.q, this.player.yaw, this.player.pitch); + return; +diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/spigotmc/SpigotConfig.java ++++ b/src/main/java/org/spigotmc/SpigotConfig.java +@@ -0,0 +0,0 @@ public class SpigotConfig + { + movedWronglyThreshold = getDouble( "settings.moved-wrongly-threshold", 0.0625D ); + } ++ ++ public static double movedTooQuicklyThreshold; ++ private static void movedTooQuicklyThreshold() ++ { ++ movedTooQuicklyThreshold = getDouble( "settings.moved-too-quickly-threshold", 100.0D ); ++ } + } +-- \ No newline at end of file diff --git a/CraftBukkit-Patches/0164-Log-debug-levels-to-the-log-file.patch b/CraftBukkit-Patches/0164-Log-debug-levels-to-the-log-file.patch new file mode 100644 index 0000000000..37f90028a2 --- /dev/null +++ b/CraftBukkit-Patches/0164-Log-debug-levels-to-the-log-file.patch @@ -0,0 +1,28 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Minecrell +Date: Thu, 24 Jul 2014 13:18:36 +0200 +Subject: [PATCH] Log debug levels to the log file. + + +diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/resources/log4j2.xml ++++ b/src/main/resources/log4j2.xml +@@ -0,0 +0,0 @@ + + + +- ++ + + + +- ++ + +- ++ + + + +-- \ No newline at end of file diff --git a/CraftBukkit-Patches/0144-Alternative-Hopper-Ticking.patch b/CraftBukkit-Patches/0165-Alternative-Hopper-Ticking.patch similarity index 100% rename from CraftBukkit-Patches/0144-Alternative-Hopper-Ticking.patch rename to CraftBukkit-Patches/0165-Alternative-Hopper-Ticking.patch diff --git a/CraftBukkit-Patches/0166-Apply-NBTReadLimiter-to-more-things.patch b/CraftBukkit-Patches/0166-Apply-NBTReadLimiter-to-more-things.patch new file mode 100644 index 0000000000..845f3e4e70 --- /dev/null +++ b/CraftBukkit-Patches/0166-Apply-NBTReadLimiter-to-more-things.patch @@ -0,0 +1,65 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: md_5 +Date: Sun, 27 Jul 2014 20:46:04 +1000 +Subject: [PATCH] Apply NBTReadLimiter to more things. + + +diff --git a/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java b/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java ++++ b/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java +@@ -0,0 +0,0 @@ public class NBTCompressedStreamTools { + + public static NBTTagCompound a(byte[] abyte, NBTReadLimiter nbtreadlimiter) { + try { +- DataInputStream datainputstream = new DataInputStream(new BufferedInputStream(new GZIPInputStream(new ByteArrayInputStream(abyte)))); ++ DataInputStream datainputstream = new DataInputStream(new BufferedInputStream(new org.spigotmc.LimitStream(new GZIPInputStream(new ByteArrayInputStream(abyte)), nbtreadlimiter))); // Spigot + + NBTTagCompound nbttagcompound; + +diff --git a/src/main/java/org/spigotmc/LimitStream.java b/src/main/java/org/spigotmc/LimitStream.java +new file mode 100644 +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 +--- /dev/null ++++ b/src/main/java/org/spigotmc/LimitStream.java +@@ -0,0 +0,0 @@ ++package org.spigotmc; ++ ++import java.io.FilterInputStream; ++import java.io.IOException; ++import java.io.InputStream; ++import net.minecraft.server.NBTReadLimiter; ++ ++public class LimitStream extends FilterInputStream ++{ ++ ++ private final NBTReadLimiter limit; ++ ++ public LimitStream(InputStream is, NBTReadLimiter limit) ++ { ++ super( is ); ++ this.limit = limit; ++ } ++ ++ @Override ++ public int read() throws IOException ++ { ++ limit.a( 1 ); ++ return super.read(); ++ } ++ ++ @Override ++ public int read(byte[] b) throws IOException ++ { ++ limit.a( b.length ); ++ return super.read( b ); ++ } ++ ++ @Override ++ public int read(byte[] b, int off, int len) throws IOException ++ { ++ limit.a( len ); ++ return super.read( b, off, len ); ++ } ++} +-- \ No newline at end of file diff --git a/SneakyThrow.jar b/SneakyThrow.jar new file mode 100644 index 0000000000..321f64ee81 Binary files /dev/null and b/SneakyThrow.jar differ diff --git a/Spigot-Server-Patches/Fix-PlayerItemDamageEvent.patch b/Spigot-Server-Patches/Fix-PlayerItemDamageEvent.patch deleted file mode 100644 index f7b307e926..0000000000 --- a/Spigot-Server-Patches/Fix-PlayerItemDamageEvent.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Thu, 24 Jul 2014 22:23:38 -0500 -Subject: [PATCH] Fix PlayerItemDamageEvent - -Taken from SpigotMC/Spigot PR#202 - -diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/ItemStack.java -+++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -0,0 +0,0 @@ public final class ItemStack { - public void damage(int i, EntityLiving entityliving) { - if (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.canInstantlyBuild) { - if (this.g()) { -- if (this.isDamaged(i, entityliving.aI())) { -+ if (this.isDamaged(i, entityliving.aI(), entityliving)) { - entityliving.a(this); - --this.count; - if (entityliving instanceof EntityHuman) { --- \ No newline at end of file