diff options
author | Aikar <[email protected]> | 2019-03-26 00:42:12 -0400 |
---|---|---|
committer | Aikar <[email protected]> | 2019-03-26 00:51:19 -0400 |
commit | 1073a39560a522a2e6e66b506582d68ac70673c9 (patch) | |
tree | 553da321811871c5ec9d3f31196b364229699c42 | |
parent | 2d68918daa82d3ead1c2c464832883ecd7622b8d (diff) | |
download | Paper-1073a39560a522a2e6e66b506582d68ac70673c9.tar.gz Paper-1073a39560a522a2e6e66b506582d68ac70673c9.zip |
Fix plugin errors corrupting timings stack
plugins that threw an error could get timings thrown off in its state
this likely led to inconsistent and unexplainable data in timings reports.
this ensures that exceptions will still stopTiming and let the system
auto self recover from corrupt stacks too.
4 files changed, 97 insertions, 66 deletions
diff --git a/Spigot-API-Patches/0003-Timings-v2.patch b/Spigot-API-Patches/0003-Timings-v2.patch index db88b51151..3c181c5f12 100644 --- a/Spigot-API-Patches/0003-Timings-v2.patch +++ b/Spigot-API-Patches/0003-Timings-v2.patch @@ -1,4 +1,4 @@ -From aaba994557e85de97413e978b93bdd9b1c63d969 Mon Sep 17 00:00:00 2001 +From 5ecd59c7f8a08d76faaa561f750665fd4ed6f18d Mon Sep 17 00:00:00 2001 From: Aikar <[email protected]> Date: Mon, 29 Feb 2016 18:48:17 -0600 Subject: [PATCH] Timings v2 @@ -160,7 +160,7 @@ index 00000000..8c43e206 +} diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java new file mode 100644 -index 00000000..feddcdbd +index 00000000..34e52ec4 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java @@ -0,0 +1,81 @@ @@ -240,9 +240,9 @@ index 00000000..feddcdbd + executor.execute(listener, event); + return; + } -+ timings.startTiming(); -+ executor.execute(listener, event); -+ timings.stopTiming(); ++ try (Timing ignored = timings.startTiming()) { ++ executor.execute(listener, event); ++ } + } +} diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java @@ -456,10 +456,10 @@ index 00000000..f222d6b7 +} diff --git a/src/main/java/co/aikar/timings/TimingHandler.java b/src/main/java/co/aikar/timings/TimingHandler.java new file mode 100644 -index 00000000..d9375833 +index 00000000..1b813cf7 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingHandler.java -@@ -0,0 +1,196 @@ +@@ -0,0 +1,202 @@ +/* + * This file is licensed under the MIT License (MIT). + * @@ -564,10 +564,16 @@ index 00000000..d9375833 + + public void stopTiming() { + if (enabled && timingDepth > 0 && Bukkit.isPrimaryThread() && --timingDepth == 0 && start != 0) { -+ TimingHandler last = TIMING_STACK.removeLast(); -+ if (last != this) { -+ Logger.getGlobal().log(Level.SEVERE, "TIMING_STACK_CORRUPTION - Report this to Paper! ( " + this.identifier + ":" + last +")", new Throwable()); -+ TIMING_STACK.addLast(last); // Add it back ++ TimingHandler last; ++ while ((last = TIMING_STACK.removeLast()) != this) { ++ last.timingDepth = 0; ++ String reportTo; ++ if ("minecraft".equals(last.identifier.group)) { ++ reportTo = "Paper! This is a potential bug in Paper"; ++ } else { ++ reportTo = "the plugin " + last.identifier.group + "(Look for errors above this in the logs)"; ++ } ++ Logger.getGlobal().log(Level.SEVERE, "TIMING_STACK_CORRUPTION - Report this to " + reportTo + " (" + last.identifier +" did not stopTiming)", new Throwable()); + } + addDiff(System.nanoTime() - start, TIMING_STACK.peekLast()); + @@ -3225,10 +3231,18 @@ index 00000000..5527e7c8 + +} diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java -index 1b5b37bf..bdc0de8c 100644 +index 1b5b37bf..22fe0663 100644 --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java -@@ -31,7 +31,7 @@ public class SimpleCommandMap implements CommandMap { +@@ -10,6 +10,7 @@ import java.util.List; + import java.util.Map; + import java.util.regex.Pattern; + ++import co.aikar.timings.Timing; + import org.apache.commons.lang.Validate; + import org.bukkit.Location; + import org.bukkit.Server; +@@ -31,7 +32,7 @@ public class SimpleCommandMap implements CommandMap { register("bukkit", new VersionCommand("version")); register("bukkit", new ReloadCommand("reload")); register("bukkit", new PluginsCommand("plugins")); @@ -3237,7 +3251,7 @@ index 1b5b37bf..bdc0de8c 100644 } public void setFallbackCommands() { -@@ -60,6 +60,7 @@ public class SimpleCommandMap implements CommandMap { +@@ -60,6 +61,7 @@ public class SimpleCommandMap implements CommandMap { * {@inheritDoc} */ public boolean register(String label, String fallbackPrefix, Command command) { @@ -3245,7 +3259,7 @@ index 1b5b37bf..bdc0de8c 100644 label = label.toLowerCase(java.util.Locale.ENGLISH).trim(); fallbackPrefix = fallbackPrefix.toLowerCase(java.util.Locale.ENGLISH).trim(); boolean registered = register(label, command, false, fallbackPrefix); -@@ -135,6 +136,12 @@ public class SimpleCommandMap implements CommandMap { +@@ -135,16 +137,22 @@ public class SimpleCommandMap implements CommandMap { return false; } @@ -3256,8 +3270,24 @@ index 1b5b37bf..bdc0de8c 100644 + // Paper end + try { - target.timings.startTiming(); // Spigot - // Note: we don't return the result of target.execute as thats success / failure, we return handled (true) or not handled (false) +- target.timings.startTiming(); // Spigot +- // Note: we don't return the result of target.execute as thats success / failure, we return handled (true) or not handled (false) +- target.execute(sender, sentCommandLabel, Arrays.copyOfRange(args, 1, args.length)); +- target.timings.stopTiming(); // Spigot ++ try (Timing ignored = target.timings.startTiming()) { // Paper - use try with resources ++ // Note: we don't return the result of target.execute as thats success / failure, we return handled (true) or not handled (false) ++ target.execute(sender, sentCommandLabel, Arrays.copyOfRange(args, 1, args.length)); ++ } + } catch (CommandException ex) { +- target.timings.stopTiming(); // Spigot ++ //target.timings.stopTiming(); // Spigot // Paper + throw ex; + } catch (Throwable ex) { +- target.timings.stopTiming(); // Spigot ++ //target.timings.stopTiming(); // Spigot // Paper + throw new CommandException("Unhandled exception executing '" + commandLine + "' in " + target, ex); + } + diff --git a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java deleted file mode 100644 index bba914d7..00000000 diff --git a/Spigot-API-Patches/0018-Add-exception-reporting-event.patch b/Spigot-API-Patches/0018-Add-exception-reporting-event.patch index 5bb2894202..a76dda75e9 100644 --- a/Spigot-API-Patches/0018-Add-exception-reporting-event.patch +++ b/Spigot-API-Patches/0018-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From b8567d82eae818cbf98656b6107c703d49d19916 Mon Sep 17 00:00:00 2001 +From ac7d29681dd2be932b84ca9bb270906521656edc Mon Sep 17 00:00:00 2001 From: Zach Brown <[email protected]> Date: Mon, 29 Feb 2016 20:24:35 -0600 Subject: [PATCH] Add exception reporting event @@ -458,28 +458,28 @@ index 00000000..5582999f + } +} diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java -index bdc0de8c..4aea03c6 100644 +index 22fe0663..154b7d91 100644 --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java -@@ -10,6 +10,9 @@ import java.util.List; - import java.util.Map; +@@ -11,6 +11,9 @@ import java.util.Map; import java.util.regex.Pattern; + import co.aikar.timings.Timing; +import com.destroystokyo.paper.event.server.ServerExceptionEvent; +import com.destroystokyo.paper.exception.ServerCommandException; +import com.destroystokyo.paper.exception.ServerTabCompleteException; import org.apache.commons.lang.Validate; import org.bukkit.Location; import org.bukkit.Server; -@@ -148,11 +151,14 @@ public class SimpleCommandMap implements CommandMap { - target.execute(sender, sentCommandLabel, Arrays.copyOfRange(args, 1, args.length)); - target.timings.stopTiming(); // Spigot +@@ -149,11 +152,14 @@ public class SimpleCommandMap implements CommandMap { + target.execute(sender, sentCommandLabel, Arrays.copyOfRange(args, 1, args.length)); + } } catch (CommandException ex) { + server.getPluginManager().callEvent(new ServerExceptionEvent(new ServerCommandException(ex, target, sender, args))); // Paper - target.timings.stopTiming(); // Spigot + //target.timings.stopTiming(); // Spigot // Paper throw ex; } catch (Throwable ex) { - target.timings.stopTiming(); // Spigot + //target.timings.stopTiming(); // Spigot // Paper - throw new CommandException("Unhandled exception executing '" + commandLine + "' in " + target, ex); + String msg = "Unhandled exception executing '" + commandLine + "' in " + target; + server.getPluginManager().callEvent(new ServerExceptionEvent(new ServerCommandException(ex, target, sender, args))); // Paper @@ -487,7 +487,7 @@ index bdc0de8c..4aea03c6 100644 } // return true as command was handled -@@ -225,7 +231,9 @@ public class SimpleCommandMap implements CommandMap { +@@ -226,7 +232,9 @@ public class SimpleCommandMap implements CommandMap { } catch (CommandException ex) { throw ex; } catch (Throwable ex) { @@ -592,5 +592,5 @@ index 80c152ba..b88f31ca 100644 } } -- -2.17.0 (Apple Git-106) +2.21.0 diff --git a/Spigot-API-Patches/0040-Allow-Reloading-of-Command-Aliases.patch b/Spigot-API-Patches/0040-Allow-Reloading-of-Command-Aliases.patch index 741745be59..e4005ecc73 100644 --- a/Spigot-API-Patches/0040-Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-API-Patches/0040-Allow-Reloading-of-Command-Aliases.patch @@ -1,4 +1,4 @@ -From 4596b1efcb3648ea18ebf94eb07b49ee90c734e1 Mon Sep 17 00:00:00 2001 +From 092987e5e264aae797401bdbab3bc9c4df9a186c Mon Sep 17 00:00:00 2001 From: willies952002 <[email protected]> Date: Mon, 28 Nov 2016 10:16:39 -0500 Subject: [PATCH] Allow Reloading of Command Aliases @@ -55,10 +55,10 @@ index 30d60247..938959aa 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java -index 4aea03c6..63d27392 100644 +index 154b7d91..474cf4c3 100644 --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java -@@ -282,4 +282,10 @@ public class SimpleCommandMap implements CommandMap { +@@ -283,4 +283,10 @@ public class SimpleCommandMap implements CommandMap { } } } @@ -97,5 +97,5 @@ index f331a442..a977045d 100644 confirmed = true; } else { -- -2.17.0 (Apple Git-106) +2.21.0 diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 81216043db..98549a69a3 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1,4 +1,4 @@ -From 5e253ec4989164677875afdb670324f72b6161bf Mon Sep 17 00:00:00 2001 +From 7e842b6dd25d4f24f0109bcc0a403066220c9795 Mon Sep 17 00:00:00 2001 From: Aikar <[email protected]> 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..c6405aa1 +index 000000000..c6405aa1b --- /dev/null +++ b/src/main/java/co/aikar/timings/MinecraftTimings.java @@ -0,0 +1,128 @@ @@ -140,7 +140,7 @@ index 00000000..c6405aa1 +} 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 @@ @@ -277,7 +277,7 @@ 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..e0ad559b +index 000000000..e0ad559b7 --- /dev/null +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java @@ -0,0 +1,99 @@ @@ -381,7 +381,7 @@ index 00000000..e0ad559b + } +} 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; @@ -425,7 +425,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 { @@ -445,7 +445,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 801dd26d..2c706f07 100644 +index 801dd26d5..2c706f07e 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -938,7 +938,7 @@ public class Chunk { @@ -493,7 +493,7 @@ index 801dd26d..2c706f07 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 86973cb9..bd006ef7 100644 +index 86973cb98..bd006ef74 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -204,7 +204,7 @@ public class ChunkProviderServer implements IChunkProvider { @@ -506,7 +506,7 @@ index 86973cb9..bd006ef7 100644 this.chunkLoader.saveChunk(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 50ec3adb..a401dec6 100644 +index 50ec3adb8..a401dec60 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -423,7 +423,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -546,7 +546,7 @@ index 50ec3adb..a401dec6 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 e1cb96a8..8f2afcc3 100644 +index e1cb96a88..8f2afcc32 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; @@ -599,7 +599,7 @@ index e1cb96a8..8f2afcc3 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 2bb23c7b..375f9d03 100644 +index 2bb23c7b2..375f9d03f 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; @@ -638,7 +638,7 @@ index 2bb23c7b..375f9d03 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 0026f29d..d15cfdd7 100644 +index 0026f29d5..d15cfdd76 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; @@ -709,7 +709,7 @@ index 0026f29d..d15cfdd7 100644 } diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java -index ce012402..a60f9460 100644 +index ce0124020..a60f94608 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 { @@ -740,7 +740,7 @@ index ce012402..a60f9460 100644 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c1a8816b..8d08b536 100644 +index c1a8816b4..8d08b536a 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; @@ -887,7 +887,7 @@ index c1a8816b..8d08b536 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 @@ @@ -987,7 +987,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 8efcb831..27a6d1e2 100644 +index 8efcb8317..27a6d1e20 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; @@ -1051,7 +1051,7 @@ index 8efcb831..27a6d1e2 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 @@ @@ -1081,7 +1081,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 d4acbed0..1d9f3e3d 100644 +index d4acbed0c..1d9f3e3dd 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1,5 +1,6 @@ @@ -1105,7 +1105,7 @@ index d4acbed0..1d9f3e3d 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..66a80a77 100644 +index 74e3f42cd..66a80a776 100644 --- a/src/main/java/net/minecraft/server/StructureGenerator.java +++ b/src/main/java/net/minecraft/server/StructureGenerator.java @@ -1,5 +1,7 @@ @@ -1147,7 +1147,7 @@ index 74e3f42c..66a80a77 100644 return flag; } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 29069b75..081e56f4 100644 +index 29069b753..081e56f48 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; @@ -1167,7 +1167,7 @@ index 29069b75..081e56f4 100644 private static final RegistryMaterials<MinecraftKey, Class<? extends TileEntity>> 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 843320ff..d902e263 100644 +index 843320ffb..d902e2630 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; @@ -1273,7 +1273,7 @@ index 843320ff..d902e263 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 c891629b..95964c55 100644 +index c891629bd..95964c550 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -308,13 +308,13 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -1407,7 +1407,7 @@ index c891629b..95964c55 100644 // CraftBukkit start diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 14851a3a..9042deed 100644 +index 14851a3a5..9042deed6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1756,12 +1756,31 @@ public final class CraftServer implements Server { @@ -1444,7 +1444,7 @@ index 14851a3a..9042deed 100644 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 666d1eb9..00000000 +index 666d1eb9e..000000000 --- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java +++ /dev/null @@ -1,175 +0,0 @@ @@ -1624,7 +1624,7 @@ index 666d1eb9..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 @@ @@ -1668,7 +1668,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 137b101a..cd99801f 100644 +index 137b101a7..cd99801ff 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -41,7 +41,7 @@ import org.bukkit.configuration.serialization.DelegateDeserialization; @@ -1694,7 +1694,7 @@ index 137b101a..cd99801f 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 f11bd754..93b9134d 100644 +index f11bd7545..93b9134d6 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; @@ -1770,7 +1770,7 @@ index f11bd754..93b9134d 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 7e7ce9a8..46029ce2 100644 +index 7e7ce9a81..f688a796d 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 @@ @@ -1831,9 +1831,10 @@ index 7e7ce9a8..46029ce2 100644 } public void run() { -+ if (timings != null && isSync()) timings.startTiming(); // Paper - task.run(); -+ if (timings != null && isSync()) timings.stopTiming(); // Paper +- task.run(); ++ try (Timing ignored = timings.startTiming()) { // Paper ++ task.run(); ++ } // Paper } long getPeriod() { @@ -1852,7 +1853,7 @@ index 7e7ce9a8..46029ce2 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; @@ -1864,7 +1865,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; @@ -1926,5 +1927,5 @@ index 2bd690fd..38be7ed7 100644 } } -- -2.19.2 +2.21.0 |