diff --git a/CraftBukkit-Patches/0005-Spigot-Configuration.patch b/CraftBukkit-Patches/0005-Spigot-Configuration.patch index 91013e6c70..c279b4503b 100644 --- a/CraftBukkit-Patches/0005-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0005-Spigot-Configuration.patch @@ -131,8 +131,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + "If you need help with the configuration or have any questions related to Spigot,\n" + + "join us at the IRC or drop by our forums and leave a post.\n" + + "\n" -+ + "IRC: #spigot @ irc.esper.net ( http://webchat.esper.net/?channel=spigot )\n" -+ + "Forums: http://www.spigotmc.org/forum/\n"; ++ + "IRC: #spigot @ irc.spi.gt ( http://www.spigotmc.org/pages/irc/ )\n" ++ + "Forums: http://www.spigotmc.org/\n"; + /*========================================================================*/ + static YamlConfiguration config; + static int version; diff --git a/CraftBukkit-Patches/0171-Fix-Corrupted-Trapped-Chest.patch b/CraftBukkit-Patches/0170-Fix-Corrupted-Trapped-Chest.patch similarity index 100% rename from CraftBukkit-Patches/0171-Fix-Corrupted-Trapped-Chest.patch rename to CraftBukkit-Patches/0170-Fix-Corrupted-Trapped-Chest.patch diff --git a/CraftBukkit-Patches/0170-Force-Close-Inventory-On-Move.patch b/CraftBukkit-Patches/0170-Force-Close-Inventory-On-Move.patch deleted file mode 100644 index 539d71c1b5..0000000000 --- a/CraftBukkit-Patches/0170-Force-Close-Inventory-On-Move.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: md_5 -Date: Sun, 10 Aug 2014 11:01:02 +1000 -Subject: [PATCH] Force Close Inventory On Move - - -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 { - - public void a(PacketPlayInBlockDig packetplayinblockdig) { - if (this.player.dead) return; // CraftBukkit -+ // Spigot start -+ if ( player.activeContainer != player.defaultContainer ) -+ { -+ getPlayer().closeInventory(); -+ } -+ // Spigot end - WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); - - this.player.v(); -@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketPlayInListener { - // a notch bug where the item doesn't update correctly. - boolean always = false; - // CraftBukkit end -+ // Spigot start -+ if ( player.activeContainer != player.defaultContainer ) -+ { -+ getPlayer().closeInventory(); -+ } -+ // Spigot end - - ItemStack itemstack = this.player.inventory.getItemInHand(); - boolean flag = false; -@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketPlayInListener { - return; - } - // Spigot End -+ // Spigot start -+ if ( player.activeContainer != player.defaultContainer ) -+ { -+ getPlayer().closeInventory(); -+ } -+ // Spigot end - - this.player.v(); - if (entity != null) { --- \ No newline at end of file diff --git a/CraftBukkit-Patches/0172-Remove-uneeded-validation.patch b/CraftBukkit-Patches/0171-Remove-uneeded-validation.patch similarity index 100% rename from CraftBukkit-Patches/0172-Remove-uneeded-validation.patch rename to CraftBukkit-Patches/0171-Remove-uneeded-validation.patch diff --git a/CraftBukkit-Patches/0173-Add-Hunger-Config-Values.patch b/CraftBukkit-Patches/0172-Add-Hunger-Config-Values.patch similarity index 100% rename from CraftBukkit-Patches/0173-Add-Hunger-Config-Values.patch rename to CraftBukkit-Patches/0172-Add-Hunger-Config-Values.patch diff --git a/CraftBukkit-Patches/0174-Make-debug-logging-togglable.patch b/CraftBukkit-Patches/0173-Make-debug-logging-togglable.patch similarity index 100% rename from CraftBukkit-Patches/0174-Make-debug-logging-togglable.patch rename to CraftBukkit-Patches/0173-Make-debug-logging-togglable.patch diff --git a/CraftBukkit-Patches/0175-Skip-invalid-enchants-in-CraftMetaItem.patch b/CraftBukkit-Patches/0174-Skip-invalid-enchants-in-CraftMetaItem.patch similarity index 100% rename from CraftBukkit-Patches/0175-Skip-invalid-enchants-in-CraftMetaItem.patch rename to CraftBukkit-Patches/0174-Skip-invalid-enchants-in-CraftMetaItem.patch diff --git a/CraftBukkit-Patches/0175-Limit-TNT-Detonations-per-tick.patch b/CraftBukkit-Patches/0175-Limit-TNT-Detonations-per-tick.patch new file mode 100644 index 0000000000..beb3105592 --- /dev/null +++ b/CraftBukkit-Patches/0175-Limit-TNT-Detonations-per-tick.patch @@ -0,0 +1,53 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Wed, 20 Aug 2014 18:12:32 -0400 +Subject: [PATCH] Limit TNT Detonations per tick + +This gives a per-world control on how much TNT will be processed per-tick, +preventing a massive TNT detonation from lagging out the server. + +diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java ++++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java +@@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { + } + + public void h() { ++ if (world.spigotConfig.currentPrimedTnt++ > world.spigotConfig.maxTntTicksPerTick) { return; } // Spigot + this.lastX = this.locX; + this.lastY = this.locY; + this.lastZ = this.locZ; +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -0,0 +0,0 @@ public class WorldServer extends World { + } + + super.tickEntities(); ++ spigotConfig.currentPrimedTnt = 0; // Spigot + } + + public void i() { +diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java ++++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +@@ -0,0 +0,0 @@ public class SpigotWorldConfig + combatExhaustion = (float) getDouble( "hunger.combat-exhaustion", 0.3 ); + regenExhaustion = (float) getDouble( "hunger.regen-exhaustion", 3 ); + } ++ ++ public int currentPrimedTnt = 0; ++ public int maxTntTicksPerTick; ++ private void maxTntPerTick() { ++ if ( SpigotConfig.version < 7 ) ++ { ++ set( "max-tnt-per-tick", 100 ); ++ } ++ maxTntTicksPerTick = getInt( "max-tnt-per-tick", 100 ); ++ log( "Max TNT Explosions: " + maxTntTicksPerTick ); ++ } + } +-- \ No newline at end of file