From d77731eee2ab05a652bcc15c23aea9deafc5ca6c Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 12 Aug 2017 22:32:01 +0100 Subject: [PATCH] Update S --- Spigot-API-Patches/0001-POM-changes.patch | 12 +-- ...002-add-Trove-and-FastUtil-to-Bukkit.patch | 12 +-- .../0006-Add-async-chunk-load-API.patch | 12 +-- ...d-MetadataStoreBase.removeAll-Plugin.patch | 12 +-- ...1-Add-source-to-PlayerExpChangeEvent.patch | 11 ++- Spigot-Server-Patches/0006-Timings-v2.patch | 96 +++++++++---------- .../0028-Lighting-Queue.patch | 14 +-- .../0061-Add-exception-reporting-event.patch | 12 +-- .../0066-Chunk-save-queue-improvements.patch | 51 +++++----- .../0067-Chunk-Save-Reattempt.patch | 10 +- .../0144-Fix-Double-World-Add-issues.patch | 6 +- .../0155-Auto-Save-Improvements.patch | 10 +- ...vent-Auto-Save-if-Save-Queue-is-full.patch | 10 +- .../0165-Chunk-Save-Stats-Debug-Option.patch | 12 +-- .../0187-String-based-Action-Bar-API.patch | 16 ++-- ...oleAppender-for-console-improvements.patch | 38 ++++---- work/Spigot | 2 +- 17 files changed, 163 insertions(+), 173 deletions(-) diff --git a/Spigot-API-Patches/0001-POM-changes.patch b/Spigot-API-Patches/0001-POM-changes.patch index 704dfd647b..5accbf5ef8 100644 --- a/Spigot-API-Patches/0001-POM-changes.patch +++ b/Spigot-API-Patches/0001-POM-changes.patch @@ -1,4 +1,4 @@ -From 62d1a2a49930c3e5caf983081fbfa8262d5eb6dd Mon Sep 17 00:00:00 2001 +From e6590f041d0d90774eb4d5b24cbd0e83f8a1129b Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 00:16:08 +0100 Subject: [PATCH] POM changes @@ -105,11 +105,10 @@ index 31b8f93e..360d2f08 100644 org.apache.maven.plugins -@@ -118,26 +137,6 @@ - +@@ -119,26 +138,6 @@ -- + - org.codehaus.mojo - animal-sniffer-maven-plugin - 1.15 @@ -129,9 +128,10 @@ index 31b8f93e..360d2f08 100644 - - - - +- org.apache.maven.plugins maven-shade-plugin + 3.0.0 @@ -151,6 +150,7 @@ @@ -141,5 +141,5 @@ index 31b8f93e..360d2f08 100644 true -- -2.14.1 +2.13.4 diff --git a/Spigot-API-Patches/0002-add-Trove-and-FastUtil-to-Bukkit.patch b/Spigot-API-Patches/0002-add-Trove-and-FastUtil-to-Bukkit.patch index 165f626df9..d2c24f7f98 100644 --- a/Spigot-API-Patches/0002-add-Trove-and-FastUtil-to-Bukkit.patch +++ b/Spigot-API-Patches/0002-add-Trove-and-FastUtil-to-Bukkit.patch @@ -1,4 +1,4 @@ -From 60ec55b1acbc4d95723b25e6c6209e541f1c8c0f Mon Sep 17 00:00:00 2001 +From 748238d525ac30269377a8ebd87d25324867d2db Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 1 Apr 2016 00:02:47 -0400 Subject: [PATCH] add Trove and FastUtil to Bukkit @@ -8,11 +8,10 @@ diff --git a/pom.xml b/pom.xml index 360d2f08..c6bdf44e 100644 --- a/pom.xml +++ b/pom.xml -@@ -55,6 +55,19 @@ - +@@ -56,6 +56,19 @@ -+ + + net.sf.trove4j + trove4j + 3.0.3 @@ -25,9 +24,10 @@ index 360d2f08..c6bdf44e 100644 + 1.0 + provided + - ++ commons-lang commons-lang + 2.6 -- -2.14.1 +2.13.4 diff --git a/Spigot-API-Patches/0006-Add-async-chunk-load-API.patch b/Spigot-API-Patches/0006-Add-async-chunk-load-API.patch index ff94b13f29..b5fca8b533 100644 --- a/Spigot-API-Patches/0006-Add-async-chunk-load-API.patch +++ b/Spigot-API-Patches/0006-Add-async-chunk-load-API.patch @@ -1,4 +1,4 @@ -From 0cbfecff228b4248ddff45b9774891905cf2bf4a Mon Sep 17 00:00:00 2001 +From 80f89a9b8a58be1a4dd5d288b51ba88f66e97179 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 29 Feb 2016 17:43:33 -0600 Subject: [PATCH] Add async chunk load API @@ -8,11 +8,10 @@ diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/Worl index 67b0d516..21b2733f 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -136,6 +136,78 @@ public interface World extends PluginMessageRecipient, Metadatable { - */ +@@ -137,6 +137,78 @@ public interface World extends PluginMessageRecipient, Metadatable { public Chunk getChunkAt(Block block); -+ /** + /** + * Used by {@link World#getChunkAtAsync(Location,ChunkLoadCallback)} methods + * to request a {@link Chunk} to be loaded, with this callback receiving + * the chunk when it is finished. @@ -84,9 +83,10 @@ index 67b0d516..21b2733f 100644 + */ + public void getChunkAtAsync(Block block, ChunkLoadCallback cb); + - /** ++ /** * Checks if the specified {@link Chunk} is loaded * + * @param chunk The chunk to check -- -2.14.1 +2.13.4 diff --git a/Spigot-API-Patches/0032-Add-MetadataStoreBase.removeAll-Plugin.patch b/Spigot-API-Patches/0032-Add-MetadataStoreBase.removeAll-Plugin.patch index 2c197b585d..0541afc936 100644 --- a/Spigot-API-Patches/0032-Add-MetadataStoreBase.removeAll-Plugin.patch +++ b/Spigot-API-Patches/0032-Add-MetadataStoreBase.removeAll-Plugin.patch @@ -1,4 +1,4 @@ -From deead5d94a52ef9bf9f10ca6bb8771cdcabb587f Mon Sep 17 00:00:00 2001 +From cf60d71f66765ec09cd221cd08bcab046e3c04c0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 16 Jul 2013 21:26:50 -0400 Subject: [PATCH] Add MetadataStoreBase.removeAll(Plugin) @@ -9,11 +9,10 @@ diff --git a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java b/src/main index 64c0f0a7..6da6abd8 100644 --- a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java +++ b/src/main/java/org/bukkit/metadata/MetadataStoreBase.java -@@ -124,6 +124,26 @@ public abstract class MetadataStoreBase { - } +@@ -125,6 +125,26 @@ public abstract class MetadataStoreBase { } -+ /** + /** + * Removes all metadata in the metadata store that originates from the + * given plugin. + * @@ -33,9 +32,10 @@ index 64c0f0a7..6da6abd8 100644 + } + } + - /** ++ /** * Creates a unique name for the object receiving metadata by combining * unique data from the subject with a metadataKey. + *

-- -2.14.1 +2.13.4 diff --git a/Spigot-API-Patches/0041-Add-source-to-PlayerExpChangeEvent.patch b/Spigot-API-Patches/0041-Add-source-to-PlayerExpChangeEvent.patch index 8f1f71d54d..73ad666b2a 100644 --- a/Spigot-API-Patches/0041-Add-source-to-PlayerExpChangeEvent.patch +++ b/Spigot-API-Patches/0041-Add-source-to-PlayerExpChangeEvent.patch @@ -1,4 +1,4 @@ -From 3447c9fafd0cc6672197a3fc7c9d16de45269ef7 Mon Sep 17 00:00:00 2001 +From f824a6c4c45b5005fe1929e7fbf39d9eaf025074 Mon Sep 17 00:00:00 2001 From: AlphaBlend Date: Thu, 8 Sep 2016 08:47:08 -0700 Subject: [PATCH] Add source to PlayerExpChangeEvent @@ -8,7 +8,7 @@ diff --git a/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java b/s index f37491d7..30882559 100644 --- a/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java -@@ -1,20 +1,42 @@ +@@ -1,21 +1,43 @@ package org.bukkit.event.player; +import org.bukkit.entity.Entity; // Paper @@ -37,7 +37,7 @@ index f37491d7..30882559 100644 exp = expAmount; } -+ /** + /** + * Get the source that provided the experience. + * + * @return The source of the experience @@ -48,9 +48,10 @@ index f37491d7..30882559 100644 + } + // Paper end + - /** ++ /** * Get the amount of experience the player will receive * + * @return The amount of experience -- -2.14.1 +2.13.4 diff --git a/Spigot-Server-Patches/0006-Timings-v2.patch b/Spigot-Server-Patches/0006-Timings-v2.patch index 7574626c27..5951565671 100644 --- a/Spigot-Server-Patches/0006-Timings-v2.patch +++ b/Spigot-Server-Patches/0006-Timings-v2.patch @@ -1,4 +1,4 @@ -From 8bbceedf9186c29258b12c1ab8c8d628edd46203 Mon Sep 17 00:00:00 2001 +From 084a67c73266f251443ffb13ae4b378706bc7a2b Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 @@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2 diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java new file mode 100644 -index 00000000..1b33390d +index 000000000..1b33390de --- /dev/null +++ b/src/main/java/co/aikar/timings/MinecraftTimings.java @@ -0,0 +1,125 @@ @@ -137,7 +137,7 @@ index 00000000..1b33390d +} diff --git a/src/main/java/co/aikar/timings/TimedChunkGenerator.java b/src/main/java/co/aikar/timings/TimedChunkGenerator.java new file mode 100644 -index 00000000..089154f6 +index 000000000..089154f62 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimedChunkGenerator.java @@ -0,0 +1,131 @@ @@ -274,10 +274,10 @@ index 00000000..089154f6 +} diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java new file mode 100644 -index 00000000..e7789117 +index 000000000..e0ad559b7 --- /dev/null +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java -@@ -0,0 +1,101 @@ +@@ -0,0 +1,99 @@ +package co.aikar.timings; + +import net.minecraft.server.World; @@ -327,7 +327,6 @@ index 00000000..e7789117 + public final Timing worldSave; + public final Timing worldSaveChunks; + public final Timing worldSaveLevel; -+ public final Timing chunkSaveNop; + public final Timing chunkSaveData; + + public WorldTimingsHandler(World server) { @@ -370,7 +369,6 @@ index 00000000..e7789117 + worldSave = Timings.ofSafe(name + "World Save"); + worldSaveLevel = Timings.ofSafe(name + "World Save - Level"); + worldSaveChunks = Timings.ofSafe(name + "World Save - Chunks"); -+ chunkSaveNop = Timings.ofSafe(name + "Chunk Save - NOP"); + chunkSaveData = Timings.ofSafe(name + "Chunk Save - Data"); + + tracker1 = Timings.ofSafe(name + "tracker stage 1"); @@ -380,7 +378,7 @@ index 00000000..e7789117 + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 5ab2cf6e..b5795b6d 100644 +index 5ab2cf6ee..b5795b6d3 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit; @@ -424,7 +422,7 @@ index 5ab2cf6e..b5795b6d 100644 + } } diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index 2dca6dbc..35231096 100644 +index 2dca6dbcb..352310960 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -35,6 +35,15 @@ public class Block { @@ -444,7 +442,7 @@ index 2dca6dbc..35231096 100644 public static int getId(Block block) { return Block.REGISTRY.a(block); // CraftBukkit - decompile error diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index d268fec3..52f6242d 100644 +index d268fec39..52f6242d7 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -900,7 +900,7 @@ public class Chunk { @@ -492,32 +490,23 @@ index d268fec3..52f6242d 100644 private void z() { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 9dcab42d..c1b0d6ce 100644 +index 787b201fd..024ea5912 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -195,7 +195,7 @@ public class ChunkProviderServer implements IChunkProvider { - } - - public void saveChunkNOP(Chunk chunk) { -- try { -+ try (co.aikar.timings.Timing timed = world.timings.chunkSaveNop.startTiming()) { - this.chunkLoader.b(this.world, chunk); - } catch (Exception exception) { - ChunkProviderServer.a.error("Couldn\'t save entities", exception); @@ -204,7 +204,7 @@ public class ChunkProviderServer implements IChunkProvider { } - public void saveChunk(Chunk chunk) { + public void saveChunk(Chunk chunk, boolean unloaded) { // Spigot - try { + try (co.aikar.timings.Timing timed = world.timings.chunkSaveData.startTiming()) { chunk.setLastSaved(this.world.getTime()); - this.chunkLoader.a(this.world, chunk); + this.chunkLoader.a(this.world, chunk, unloaded); // Spigot } catch (IOException ioexception) { diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 9655a3ce..cdb0b134 100644 +index a07e2c1fd..682b4230e 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -397,7 +397,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -423,7 +423,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { public void loadEntities(Chunk chunk, NBTTagCompound nbttagcompound, World world) { // CraftBukkit end @@ -526,7 +515,7 @@ index 9655a3ce..cdb0b134 100644 NBTTagList nbttaglist1 = nbttagcompound.getList("Entities", 10); for (int l = 0; l < nbttaglist1.size(); ++l) { -@@ -406,8 +406,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -432,8 +432,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { a(nbttagcompound2, world, chunk); chunk.g(true); } @@ -535,7 +524,7 @@ index 9655a3ce..cdb0b134 100644 NBTTagList nbttaglist2 = nbttagcompound.getList("TileEntities", 10); for (int i1 = 0; i1 < nbttaglist2.size(); ++i1) { -@@ -418,8 +416,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -444,8 +442,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { chunk.a(tileentity); } } @@ -544,7 +533,7 @@ index 9655a3ce..cdb0b134 100644 if (nbttagcompound.hasKeyOfType("TileTicks", 9)) { NBTTagList nbttaglist3 = nbttagcompound.getList("TileTicks", 10); -@@ -437,7 +433,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -463,7 +459,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { world.b(new BlockPosition(nbttagcompound4.getInt("x"), nbttagcompound4.getInt("y"), nbttagcompound4.getInt("z")), block, nbttagcompound4.getInt("t"), nbttagcompound4.getInt("p")); } } @@ -554,7 +543,7 @@ index 9655a3ce..cdb0b134 100644 // return chunk; // CraftBukkit } diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 6f63a5a1..3b842591 100644 +index 6f63a5a1d..3b8425915 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -24,7 +24,7 @@ import java.io.PrintStream; @@ -607,7 +596,7 @@ index 6f63a5a1..3b842591 100644 return waitable.get(); } catch (java.util.concurrent.ExecutionException e) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c2da96ea..6d47f384 100644 +index c2da96eaf..6d47f384a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -25,7 +25,8 @@ import org.bukkit.block.BlockFace; @@ -646,7 +635,7 @@ index c2da96ea..6d47f384 100644 public void recalcPosition() { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 27580a93..35812d56 100644 +index 27580a938..35812d561 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -31,7 +31,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -717,7 +706,7 @@ index 27580a93..35812d56 100644 } diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java -index 284d1204..3aab5420 100644 +index 284d1204d..3aab54206 100644 --- a/src/main/java/net/minecraft/server/EntityTracker.java +++ b/src/main/java/net/minecraft/server/EntityTracker.java @@ -175,7 +175,7 @@ public class EntityTracker { @@ -748,7 +737,7 @@ index 284d1204..3aab5420 100644 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index da9ad603..5b5c143b 100644 +index da9ad6037..5b5c143b0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -48,8 +48,8 @@ import org.bukkit.Bukkit; @@ -895,7 +884,7 @@ index da9ad603..5b5c143b 100644 this.methodProfiler.b(); } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index eeac3499..e4ed2e99 100644 +index eeac34998..e4ed2e991 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -1,5 +1,6 @@ @@ -995,7 +984,7 @@ index eeac3499..e4ed2e99 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index b679b136..03bbac73 100644 +index b679b1363..03bbac737 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -56,6 +56,7 @@ import org.bukkit.inventory.CraftingInventory; @@ -1043,7 +1032,7 @@ index b679b136..03bbac73 100644 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java -index f74b0679..1fc632e0 100644 +index f74b06794..1fc632e0c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java +++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java @@ -1,15 +1,21 @@ @@ -1073,7 +1062,7 @@ index f74b0679..1fc632e0 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index c00aee88..b3356b40 100644 +index c00aee885..b3356b40f 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1,5 +1,6 @@ @@ -1097,7 +1086,7 @@ index c00aee88..b3356b40 100644 public void addWhitelist(GameProfile gameprofile) { diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java -index 74e3f42c..2580a4cf 100644 +index 74e3f42cd..2580a4cf6 100644 --- a/src/main/java/net/minecraft/server/StructureGenerator.java +++ b/src/main/java/net/minecraft/server/StructureGenerator.java @@ -1,5 +1,7 @@ @@ -1139,7 +1128,7 @@ index 74e3f42c..2580a4cf 100644 return flag; } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 5a5a588e..d2d4ff6f 100644 +index 5a5a588e7..d2d4ff6fb 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -4,12 +4,13 @@ import javax.annotation.Nullable; @@ -1159,7 +1148,7 @@ index 5a5a588e..d2d4ff6f 100644 private static final RegistryMaterials> f = new RegistryMaterials(); protected World world; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 1096c6c6..f06b82ec 100644 +index 1096c6c66..f06b82ec5 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -19,11 +19,11 @@ import com.google.common.collect.Maps; @@ -1265,7 +1254,7 @@ index 1096c6c6..f06b82ec 100644 public boolean b(AxisAlignedBB axisalignedbb) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 8afe1d3d..00b09397 100644 +index 8afe1d3d3..00b093976 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -304,13 +304,13 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -1399,10 +1388,10 @@ index 8afe1d3d..00b09397 100644 // CraftBukkit start diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ec98b3a0..63bbcf0b 100644 +index ec98b3a02..63bbcf0b1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1755,12 +1755,31 @@ public final class CraftServer implements Server { +@@ -1755,6 +1755,7 @@ public final class CraftServer implements Server { private final Spigot spigot = new Spigot() { @@ -1410,10 +1399,10 @@ index ec98b3a0..63bbcf0b 100644 @Override public YamlConfiguration getConfig() { - return org.spigotmc.SpigotConfig.config; +@@ -1762,6 +1763,24 @@ public final class CraftServer implements Server { } -+ @Override + @Override + public YamlConfiguration getBukkitConfig() + { + return configuration; @@ -1431,12 +1420,13 @@ index ec98b3a0..63bbcf0b 100644 + return com.destroystokyo.paper.PaperConfig.config; + } + - @Override ++ @Override public void restart() { org.spigotmc.RestartCommand.restart(); + } diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java deleted file mode 100644 -index 311a2c3f..00000000 +index 311a2c3f6..000000000 --- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java +++ /dev/null @@ -1,174 +0,0 @@ @@ -1615,7 +1605,7 @@ index 311a2c3f..00000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java -index 3a95b446..b5efb9c3 100644 +index 3a95b4465..b5efb9c3f 100644 --- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java +++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java @@ -1,6 +1,8 @@ @@ -1659,7 +1649,7 @@ index 3a95b446..b5efb9c3 100644 public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ca138fa6..d3890088 100644 +index ca138fa65..d38900887 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -38,7 +38,7 @@ import org.bukkit.configuration.serialization.DelegateDeserialization; @@ -1685,7 +1675,7 @@ index ca138fa6..d3890088 100644 public Player.Spigot spigot() diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index 27725b20..19adb77b 100644 +index 27725b20e..19adb77b5 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -14,6 +14,7 @@ import java.util.concurrent.atomic.AtomicInteger; @@ -1761,7 +1751,7 @@ index 27725b20..19adb77b 100644 private boolean isReady(final int currentTick) { diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java -index 220e39ab..afc6c17e 100644 +index 220e39abe..afc6c17e6 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java @@ -1,8 +1,8 @@ @@ -1843,7 +1833,7 @@ index 220e39ab..afc6c17e 100644 - // Spigot end } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java -index e52ef47b..3d90b342 100644 +index e52ef47b7..3d90b3426 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java @@ -5,6 +5,7 @@ import org.bukkit.util.CachedServerIcon; @@ -1855,7 +1845,7 @@ index e52ef47b..3d90b342 100644 this.value = value; } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 2bd690fd..38be7ed7 100644 +index 2bd690fdf..38be7ed71 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -29,7 +29,7 @@ import net.minecraft.server.EntityWither; @@ -1917,5 +1907,5 @@ index 2bd690fd..38be7ed7 100644 } } -- -2.14.1 +2.13.4 diff --git a/Spigot-Server-Patches/0028-Lighting-Queue.patch b/Spigot-Server-Patches/0028-Lighting-Queue.patch index 65dc4ae583..1306b36af3 100644 --- a/Spigot-Server-Patches/0028-Lighting-Queue.patch +++ b/Spigot-Server-Patches/0028-Lighting-Queue.patch @@ -1,4 +1,4 @@ -From e9f9bada83c268b1e5c99edd85dd13107d8b48b6 Mon Sep 17 00:00:00 2001 +From 91e45fcf2bf47bd1fedb7a09c7e0e1f14a1230bf Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 00:52:31 -0600 Subject: [PATCH] Lighting Queue @@ -6,11 +6,11 @@ Subject: [PATCH] Lighting Queue This provides option to queue lighting updates to ensure they do not cause the server lag diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java -index e7789117b..f90f5bf84 100644 +index e0ad559b7..4eebd9fae 100644 --- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java -@@ -50,6 +50,8 @@ public class WorldTimingsHandler { - public final Timing chunkSaveNop; +@@ -49,6 +49,8 @@ public class WorldTimingsHandler { + public final Timing worldSaveLevel; public final Timing chunkSaveData; + public final Timing lightingQueueTimer; @@ -18,7 +18,7 @@ index e7789117b..f90f5bf84 100644 public WorldTimingsHandler(World server) { String name = server.worldData.getName() +" - "; -@@ -97,5 +99,7 @@ public class WorldTimingsHandler { +@@ -95,5 +97,7 @@ public class WorldTimingsHandler { tracker2 = Timings.ofSafe(name + "tracker stage 2"); doTick = Timings.ofSafe(name + "doTick"); tickEntities = Timings.ofSafe(name + "tickEntities"); @@ -85,7 +85,7 @@ index a4b7d0176..6def9debe 100644 TileEntity tileentity; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index c1b0d6cea..ba720204d 100644 +index 024ea5912..ae527d527 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -295,6 +295,7 @@ public class ChunkProviderServer implements IChunkProvider { @@ -238,5 +238,5 @@ index c25e65428..763f21570 100644 } -- -2.13.3.windows.1 +2.13.4 diff --git a/Spigot-Server-Patches/0061-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0061-Add-exception-reporting-event.patch index 09a332015b..6987ffc272 100644 --- a/Spigot-Server-Patches/0061-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0061-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From df6d49ffc0e5caacd6f49c418ed2c65aa80d5e4c Mon Sep 17 00:00:00 2001 +From 69de753bd05636242fc049021c34cb8622e85c69 Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 03:15:41 -0600 Subject: [PATCH] Add exception reporting event @@ -89,7 +89,7 @@ index c8e52eab1..33737af78 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index ba720204d..9449b645d 100644 +index ae527d527..52490d02a 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -12,6 +12,7 @@ import java.util.Iterator; @@ -114,8 +114,8 @@ index ba720204d..9449b645d 100644 } } @@ -198,7 +203,11 @@ public class ChunkProviderServer implements IChunkProvider { - try (co.aikar.timings.Timing timed = world.timings.chunkSaveNop.startTiming()) { - this.chunkLoader.b(this.world, chunk); + try { + // this.chunkLoader.b(this.world, chunk); // Spigot } catch (Exception exception) { - ChunkProviderServer.a.error("Couldn\'t save entities", exception); + // Paper start @@ -128,7 +128,7 @@ index ba720204d..9449b645d 100644 } @@ -208,9 +217,14 @@ public class ChunkProviderServer implements IChunkProvider { chunk.setLastSaved(this.world.getTime()); - this.chunkLoader.a(this.world, chunk); + this.chunkLoader.a(this.world, chunk, unloaded); // Spigot } catch (IOException ioexception) { - ChunkProviderServer.a.error("Couldn\'t save chunk", ioexception); + // Paper start @@ -373,5 +373,5 @@ index 19adb77b5..b9d93a01f 100644 // (async tasks must live with race-conditions if they attempt to cancel between these few lines of code) } -- -2.13.3.windows.1 +2.13.4 diff --git a/Spigot-Server-Patches/0066-Chunk-save-queue-improvements.patch b/Spigot-Server-Patches/0066-Chunk-save-queue-improvements.patch index 480498d49d..2891423375 100644 --- a/Spigot-Server-Patches/0066-Chunk-save-queue-improvements.patch +++ b/Spigot-Server-Patches/0066-Chunk-save-queue-improvements.patch @@ -1,4 +1,4 @@ -From 3cf72e3346d3d809dc82f2813aa459c3a97c6467 Mon Sep 17 00:00:00 2001 +From 7b7f601ad0c78736c6699917a5e4627dea796289 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 4 Mar 2016 18:18:37 -0600 Subject: [PATCH] Chunk save queue improvements @@ -41,26 +41,28 @@ index 36689db74..3898ad8fa 100644 + } } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index cdb0b1342..cd976f09e 100644 +index 682b4230e..772da28aa 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -12,11 +12,14 @@ import java.util.List; +@@ -12,6 +12,7 @@ import java.util.List; import java.util.Map; import java.util.Set; import javax.annotation.Nullable; +import java.util.concurrent.ConcurrentLinkedQueue; // Paper import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; + // Spigot start +@@ -21,6 +22,8 @@ import org.spigotmc.SupplierUtils; public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + private ConcurrentLinkedQueue queue = new ConcurrentLinkedQueue<>(); // Paper - Chunk queue improvements + private final Object lock = new Object(); // Paper - Chunk queue improvements private static final Logger a = LogManager.getLogger(); - private final Map b = Maps.newConcurrentMap(); + private final Map> b = Maps.newConcurrentMap(); // Spigot // CraftBukkit -@@ -138,9 +141,10 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { - protected void a(ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound) { +@@ -155,9 +158,10 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + protected void a(ChunkCoordIntPair chunkcoordintpair, Supplier nbttagcompound) { // Spigot // CraftBukkit // if (!this.c.contains(chunkcoordintpair)) - { @@ -71,11 +73,11 @@ index cdb0b1342..cd976f09e 100644 FileIOThread.a().a(this); } -@@ -151,8 +155,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -168,8 +172,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } private synchronized boolean processSaveQueueEntry(boolean logCompletion) { -- Iterator> iter = this.b.entrySet().iterator(); +- Iterator>> iter = this.b.entrySet().iterator(); // Spigot - if (!iter.hasNext()) { + // CraftBukkit start + // Paper start - Chunk queue improvements @@ -85,43 +87,40 @@ index cdb0b1342..cd976f09e 100644 if (logCompletion) { // CraftBukkit end ChunkRegionLoader.a.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.d.getName()); -@@ -160,18 +167,14 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -177,17 +184,13 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { return false; } else { - // CraftBukkit start -- Map.Entry entry = iter.next(); +- Map.Entry> entry = iter.next(); // Spigot - ChunkCoordIntPair chunkcoordintpair = entry.getKey(); -- NBTTagCompound nbttagcompound = entry.getValue(); +- Supplier value = entry.getValue(); // Spigot - // CraftBukkit end + ChunkCoordIntPair chunkcoordintpair = chunk.coords; // Paper - Chunk queue improvements boolean flag; try { -- // this.c.add(chunkcoordintpair); -- // NBTTagCompound nbttagcompound = (NBTTagCompound) this.b.remove(chunkcoordintpair); -- // CraftBukkit -+ //this.c.add(chunkcoordintpair); -+ //NBTTagCompound nbttagcompound = (NBTTagCompound) entry.getValue(); // CraftBukkit // Paper - Chunk queue improvements -+ NBTTagCompound nbttagcompound = chunk.compound; // Paper - Chunk queue improvements + // this.c.add(chunkcoordintpair); +- NBTTagCompound nbttagcompound = SupplierUtils.getIfExists(value); // Spigot ++ NBTTagCompound nbttagcompound = SupplierUtils.getIfExists(chunk.compoundSupplier); // Spigot // Paper + // CraftBukkit if (nbttagcompound != null) { - try { -@@ -180,10 +183,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -197,10 +200,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { ChunkRegionLoader.a.error("Failed to save chunk", exception); } } -+ synchronized (lock) { if (this.b.get(chunkcoordintpair) == nbttagcompound) { this.b.remove(chunkcoordintpair); } }// Paper - This will not equal if a newer version is still pending ++ synchronized (lock) { if (this.b.get(chunkcoordintpair) == chunk.compoundSupplier) { this.b.remove(chunkcoordintpair); } }// Paper - This will not equal if a newer version is still pending flag = true; } finally { -- this.b.remove(chunkcoordintpair, nbttagcompound); // CraftBukkit -+ //this.b.remove(chunkcoordintpair, nbttagcompound); // CraftBukkit // Paper +- this.b.remove(chunkcoordintpair, value); // CraftBukkit // Spigot ++ //this.b.remove(chunkcoordintpair, value); // CraftBukkit // Spigot // Paper } return flag; -@@ -548,4 +552,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -574,4 +578,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { return entity; } } @@ -129,11 +128,11 @@ index cdb0b1342..cd976f09e 100644 + // Paper start - Chunk queue improvements + private static class QueuedChunk { + public ChunkCoordIntPair coords; -+ public NBTTagCompound compound; ++ public Supplier compoundSupplier; + -+ public QueuedChunk(ChunkCoordIntPair coords, NBTTagCompound compound) { ++ public QueuedChunk(ChunkCoordIntPair coords, Supplier compoundSupplier) { + this.coords = coords; -+ this.compound = compound; ++ this.compoundSupplier = compoundSupplier; + } + } + // Paper end diff --git a/Spigot-Server-Patches/0067-Chunk-Save-Reattempt.patch b/Spigot-Server-Patches/0067-Chunk-Save-Reattempt.patch index a95a8c5429..cb9b078103 100644 --- a/Spigot-Server-Patches/0067-Chunk-Save-Reattempt.patch +++ b/Spigot-Server-Patches/0067-Chunk-Save-Reattempt.patch @@ -1,4 +1,4 @@ -From 7b1b6ddb0ee1c4411cb27bca78dbca5e0d4f0c70 Mon Sep 17 00:00:00 2001 +From ed5ec72d4b67b763f70a69cd395a526a8c483b6a Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 4 Mar 2013 23:46:10 -0500 Subject: [PATCH] Chunk Save Reattempt @@ -6,11 +6,11 @@ Subject: [PATCH] Chunk Save Reattempt We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks. diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index cd976f09e..d1c13f00d 100644 +index 772da28aa..6f2c192af 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -177,11 +177,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { - NBTTagCompound nbttagcompound = chunk.compound; // Paper - Chunk queue improvements +@@ -194,11 +194,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + // CraftBukkit if (nbttagcompound != null) { + int attempts = 0; Exception laste = null; while (attempts++ < 5) { // Paper @@ -25,7 +25,7 @@ index cd976f09e..d1c13f00d 100644 + try {Thread.sleep(10);} catch (InterruptedException e) {e.printStackTrace();} } // Paper + if (laste != null) { com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(laste); MinecraftServer.LOGGER.error("Failed to save chunk", laste); } // Paper } - synchronized (lock) { if (this.b.get(chunkcoordintpair) == nbttagcompound) { this.b.remove(chunkcoordintpair); } }// Paper - This will not equal if a newer version is still pending + synchronized (lock) { if (this.b.get(chunkcoordintpair) == chunk.compoundSupplier) { this.b.remove(chunkcoordintpair); } }// Paper - This will not equal if a newer version is still pending diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java index 6a92b5af8..5bcbd718f 100644 diff --git a/Spigot-Server-Patches/0144-Fix-Double-World-Add-issues.patch b/Spigot-Server-Patches/0144-Fix-Double-World-Add-issues.patch index 74c4a105b4..0c8bd68203 100644 --- a/Spigot-Server-Patches/0144-Fix-Double-World-Add-issues.patch +++ b/Spigot-Server-Patches/0144-Fix-Double-World-Add-issues.patch @@ -1,4 +1,4 @@ -From 9f62de2d9723d6ed184b539d495b8838d12955eb Mon Sep 17 00:00:00 2001 +From 675a5f849faf266403c1cca10e1db3914dd9a42e Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 21 Jun 2016 22:54:34 -0400 Subject: [PATCH] Fix Double World Add issues @@ -8,10 +8,10 @@ Vanilla will double add Spider Jockeys to the world, so ignore already added. Also add debug if something else tries to, and abort before world gets bad state diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index d1c13f00d..5f999d275 100644 +index cee77e7a3..f5366ebf0 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -520,7 +520,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -546,7 +546,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } public static void a(Entity entity, World world, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) { diff --git a/Spigot-Server-Patches/0155-Auto-Save-Improvements.patch b/Spigot-Server-Patches/0155-Auto-Save-Improvements.patch index f669fbc133..380b6c3b82 100644 --- a/Spigot-Server-Patches/0155-Auto-Save-Improvements.patch +++ b/Spigot-Server-Patches/0155-Auto-Save-Improvements.patch @@ -1,4 +1,4 @@ -From bbd03ab220fef5955d62b11cf1f5a420e929c0b3 Mon Sep 17 00:00:00 2001 +From c71fcf67f2672505bcdba3ec19a1e51421b00e70 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 19 Sep 2016 23:16:39 -0400 Subject: [PATCH] Auto Save Improvements @@ -76,7 +76,7 @@ index a0b5cd56b..f98d380f6 100644 public Random a(long i) { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index df3235981..067c53b12 100644 +index a01356ccc..08bc8c928 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -1,5 +1,6 @@ @@ -87,7 +87,7 @@ index df3235981..067c53b12 100644 import com.google.common.collect.Sets; import it.unimi.dsi.fastutil.longs.Long2ObjectMap; @@ -266,7 +267,7 @@ public class ChunkProviderServer implements IChunkProvider { - this.saveChunk(chunk); + this.saveChunk(chunk, false); // Spigot chunk.f(false); ++i; - if (i == 24 && !flag && false) { // Spigot @@ -96,7 +96,7 @@ index df3235981..067c53b12 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 1d1948e9c..ef211aedd 100644 +index ed4fc3096..299b1df9e 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -32,6 +32,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -215,5 +215,5 @@ index 3865b31cb..87a95857c 100644 timings.worldSaveChunks.startTiming(); // Paper chunkproviderserver.a(flag); -- -2.13.3.windows.1 +2.13.4 diff --git a/Spigot-Server-Patches/0164-Prevent-Auto-Save-if-Save-Queue-is-full.patch b/Spigot-Server-Patches/0164-Prevent-Auto-Save-if-Save-Queue-is-full.patch index e879349347..7082403da5 100644 --- a/Spigot-Server-Patches/0164-Prevent-Auto-Save-if-Save-Queue-is-full.patch +++ b/Spigot-Server-Patches/0164-Prevent-Auto-Save-if-Save-Queue-is-full.patch @@ -1,4 +1,4 @@ -From 8e6b3b1e301b131f570a5b91eaf71ac340b403c5 Mon Sep 17 00:00:00 2001 +From 6b0389b527082a300a774c980ad6c19cb1a4d86a Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Nov 2016 21:52:22 -0400 Subject: [PATCH] Prevent Auto Save if Save Queue is full @@ -23,7 +23,7 @@ index efae01b1d..70b498c7b 100644 private void removeCorruptTEs() { removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false); diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 067c53b12..ef194312b 100644 +index 08bc8c928..25f1d40db 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -254,6 +254,14 @@ public class ChunkProviderServer implements IChunkProvider { @@ -42,7 +42,7 @@ index 067c53b12..ef194312b 100644 while (iterator.hasNext()) { Chunk chunk = (Chunk) iterator.next(); @@ -267,7 +275,7 @@ public class ChunkProviderServer implements IChunkProvider { - this.saveChunk(chunk); + this.saveChunk(chunk, false); // Spigot chunk.f(false); ++i; - if (!flag && i >= world.paperConfig.maxAutoSaveChunksPerTick) { // Spigot - // Paper - Incremental Auto Save - cap max per tick @@ -51,10 +51,10 @@ index 067c53b12..ef194312b 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 3ed762f05..e90d08b0d 100644 +index f5366ebf0..023dddcb8 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -34,6 +34,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -39,6 +39,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { this.e = dataconvertermanager; } diff --git a/Spigot-Server-Patches/0165-Chunk-Save-Stats-Debug-Option.patch b/Spigot-Server-Patches/0165-Chunk-Save-Stats-Debug-Option.patch index a1c62447c8..6d4ae273d0 100644 --- a/Spigot-Server-Patches/0165-Chunk-Save-Stats-Debug-Option.patch +++ b/Spigot-Server-Patches/0165-Chunk-Save-Stats-Debug-Option.patch @@ -1,4 +1,4 @@ -From 88c663c910b32ef367273b25e59a311cc6f24dd5 Mon Sep 17 00:00:00 2001 +From 76f07679ab0bcdc7d4801978a2e8e82ed4d7a3eb Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 4 Nov 2016 02:12:10 -0400 Subject: [PATCH] Chunk Save Stats Debug Option @@ -8,7 +8,7 @@ Adds a command line flag to enable stats on how chunk saves are processing. Stats on current queue, how many was processed and how many were queued. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index ef194312b..8fca62eec 100644 +index 25f1d40db..09c0c3719 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -28,6 +28,11 @@ public class ChunkProviderServer implements IChunkProvider { @@ -55,10 +55,10 @@ index ef194312b..8fca62eec 100644 return false; } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 67753e0b1..ea91c0477 100644 +index 023dddcb8..aaf1a2095 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -34,7 +34,13 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -39,7 +39,13 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { this.e = dataconvertermanager; } @@ -73,7 +73,7 @@ index 67753e0b1..ea91c0477 100644 // CraftBukkit start - Add async variant, provide compatibility @Nullable -@@ -146,6 +152,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -163,6 +169,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { synchronized (lock) { // Paper - Chunk queue improvements this.b.put(chunkcoordintpair, nbttagcompound); } @@ -81,7 +81,7 @@ index 67753e0b1..ea91c0477 100644 queue.add(new QueuedChunk(chunkcoordintpair, nbttagcompound)); // Paper - Chunk queue improvements FileIOThread.a().a(this); -@@ -170,6 +177,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -187,6 +194,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { return false; } else { ChunkCoordIntPair chunkcoordintpair = chunk.coords; // Paper - Chunk queue improvements diff --git a/Spigot-Server-Patches/0187-String-based-Action-Bar-API.patch b/Spigot-Server-Patches/0187-String-based-Action-Bar-API.patch index 01228a775d..b371a47692 100644 --- a/Spigot-Server-Patches/0187-String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/0187-String-based-Action-Bar-API.patch @@ -1,11 +1,11 @@ -From d5090572a893a013cb7485d6ca040cc46d66eff6 Mon Sep 17 00:00:00 2001 +From 5cacb04e314cf7d0442b8a1c26413b76d030dc09 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 27 Dec 2016 15:02:42 -0500 Subject: [PATCH] String based Action Bar API diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 1159eea1..38359517 100644 +index 1159eea1a..38359517c 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -1,10 +1,13 @@ @@ -62,14 +62,13 @@ index 1159eea1..38359517 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index b65ac0c7..005c8a00 100644 +index 41330c2a2..f30613672 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -171,6 +171,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - } +@@ -172,6 +172,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper start -+ @Override + @Override + public void sendActionBar(String message) { + if (getHandle().playerConnection == null || message == null || message.isEmpty()) return; + getHandle().playerConnection.sendPacket(new PacketPlayOutChat(new ChatComponentText(message), ChatMessageType.GAME_INFO)); @@ -81,9 +80,10 @@ index b65ac0c7..005c8a00 100644 + sendActionBar(org.bukkit.ChatColor.translateAlternateColorCodes(alternateChar, message)); + } + - @Override ++ @Override public void setPlayerListHeaderFooter(BaseComponent[] header, BaseComponent[] footer) { PacketPlayOutPlayerListHeaderFooter packet = new PacketPlayOutPlayerListHeaderFooter(); + packet.header = header; -- -2.14.1 +2.13.4 diff --git a/Spigot-Server-Patches/0211-Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/0211-Use-TerminalConsoleAppender-for-console-improvements.patch index 4ddc0e9a63..a0d4383880 100644 --- a/Spigot-Server-Patches/0211-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/0211-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -1,4 +1,4 @@ -From 63fe9d56abcc775909d9bd3bc8d11039aafd825a Mon Sep 17 00:00:00 2001 +From f38db227895c395f7cca144b1d521c6e6233d6fe Mon Sep 17 00:00:00 2001 From: Minecrell Date: Fri, 9 Jun 2017 19:03:43 +0200 Subject: [PATCH] Use TerminalConsoleAppender for console improvements @@ -20,22 +20,22 @@ Other changes: configuration diff --git a/pom.xml b/pom.xml -index 7f6f7fe8..d3661164 100644 +index 7f6f7fe84..d36611644 100644 --- a/pom.xml +++ b/pom.xml -@@ -53,12 +53,6 @@ - 5.0.4 +@@ -54,12 +54,6 @@ compile -- + - jline - jline - 2.12.1 - compile - - +- org.xerial sqlite-jdbc + 3.19.3 @@ -77,6 +71,38 @@ 3.0.3 compile @@ -96,7 +96,7 @@ index 7f6f7fe8..d3661164 100644 org.apache.maven.plugins diff --git a/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java new file mode 100644 -index 00000000..685deaa0 +index 000000000..685deaa0e --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java @@ -0,0 +1,17 @@ @@ -119,7 +119,7 @@ index 00000000..685deaa0 +} diff --git a/src/main/java/com/destroystokyo/paper/console/TerminalHandler.java b/src/main/java/com/destroystokyo/paper/console/TerminalHandler.java new file mode 100644 -index 00000000..d5bc6149 +index 000000000..d5bc61490 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/console/TerminalHandler.java @@ -0,0 +1,60 @@ @@ -184,7 +184,7 @@ index 00000000..d5bc6149 + +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 3b842591..059f6b6b 100644 +index 3b8425915..059f6b6b5 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -73,7 +73,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -237,7 +237,7 @@ index 3b842591..059f6b6b 100644 System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true)); System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true)); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index a4f44b39..ea2c5713 100644 +index a4f44b39b..ea2c57137 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -42,7 +42,6 @@ import org.apache.commons.lang3.Validate; @@ -296,7 +296,7 @@ index a4f44b39..ea2c5713 100644 public boolean a(int i, String s) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index b8a0b67a..ebca377e 100644 +index b8a0b67a9..ebca377e5 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -78,8 +78,7 @@ public abstract class PlayerList { @@ -310,7 +310,7 @@ index b8a0b67a..ebca377e 100644 this.k = new GameProfileBanList(PlayerList.a); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 444f2801..9c0b3c60 100644 +index 444f28019..9c0b3c60e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -128,7 +128,6 @@ import io.netty.buffer.ByteBuf; @@ -336,7 +336,7 @@ index 444f2801..9c0b3c60 100644 @Override public PluginCommand getPluginCommand(String name) { diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index ec9508e9..d3d848f8 100644 +index ec9508e90..d3d848f8c 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -14,7 +14,7 @@ import java.util.logging.Logger; @@ -378,7 +378,7 @@ index ec9508e9..d3d848f8 100644 if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { diff --git a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java b/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java deleted file mode 100644 -index 26a2fb89..00000000 +index 26a2fb894..000000000 --- a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java +++ /dev/null @@ -1,74 +0,0 @@ @@ -457,7 +457,7 @@ index 26a2fb89..00000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java -index 33e8ea02..1e3aae3b 100644 +index 33e8ea02c..1e3aae3b8 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java +++ b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java @@ -8,17 +8,27 @@ import java.util.logging.Level; @@ -536,7 +536,7 @@ index 33e8ea02..1e3aae3b 100644 } } diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java -index a0cdd231..0a181288 100644 +index a0cdd2317..0a1812883 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java +++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java @@ -19,7 +19,7 @@ public class ServerShutdownThread extends Thread { @@ -550,7 +550,7 @@ index a0cdd231..0a181288 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java b/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java deleted file mode 100644 -index b6409711..00000000 +index b64097113..000000000 --- a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java +++ /dev/null @@ -1,54 +0,0 @@ @@ -609,7 +609,7 @@ index b6409711..00000000 - } -} diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml -index 5cee8f00..08b6bb7f 100644 +index 5cee8f00e..08b6bb7f9 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -1,12 +1,11 @@ @@ -639,5 +639,5 @@ index 5cee8f00..08b6bb7f 100644 -- -2.14.1 +2.13.4 diff --git a/work/Spigot b/work/Spigot index 5340a52690..65e8124d1a 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 5340a52690887488ebb8d88d6f4a7236eade58ca +Subproject commit 65e8124d1adfa77a02ecd619be8ee28f3e89cafd