diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2015-02-02 20:53:21 +0000 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2015-02-02 20:53:21 +0000 |
commit | d3d13610420cc3d9bd2a913436ecfd89fd23903d (patch) | |
tree | 1f53f54e86e9a763cefcad0bfad55df17346f744 /nms-patches | |
parent | 4c6df1b96b0ab1636cfc52d28dde6f4b67108c5a (diff) | |
download | craftbukkit-d3d13610420cc3d9bd2a913436ecfd89fd23903d.tar craftbukkit-d3d13610420cc3d9bd2a913436ecfd89fd23903d.tar.gz craftbukkit-d3d13610420cc3d9bd2a913436ecfd89fd23903d.tar.lz craftbukkit-d3d13610420cc3d9bd2a913436ecfd89fd23903d.tar.xz craftbukkit-d3d13610420cc3d9bd2a913436ecfd89fd23903d.zip |
Fix exceptions from tasks being ignored
Diffstat (limited to 'nms-patches')
-rw-r--r-- | nms-patches/MinecraftServer.patch | 57 |
1 files changed, 36 insertions, 21 deletions
diff --git a/nms-patches/MinecraftServer.patch b/nms-patches/MinecraftServer.patch index e5605805..eaeb1049 100644 --- a/nms-patches/MinecraftServer.patch +++ b/nms-patches/MinecraftServer.patch @@ -1,5 +1,5 @@ ---- ../decompile-8eb82bde//net/minecraft/server/MinecraftServer.java 2014-12-03 14:33:55.037564649 -0500 -+++ src/main/java/net/minecraft/server/MinecraftServer.java 2014-12-03 14:33:47.061564766 -0500 +--- ../work/decompile-8eb82bde//net/minecraft/server/MinecraftServer.java 2015-02-02 20:53:00.268118352 +0000 ++++ src/main/java/net/minecraft/server/MinecraftServer.java 2015-02-02 20:53:00.284118351 +0000 @@ -37,6 +37,18 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -394,7 +394,22 @@ this.methodProfiler.a("save"); this.v.savePlayers(); this.saveChunks(true); -@@ -493,20 +649,40 @@ +@@ -484,29 +640,53 @@ + synchronized (this.i) { + while (!this.i.isEmpty()) { + try { +- ((FutureTask) this.i.poll()).run(); ++ // CraftBukkit start - log exceptions ++ FutureTask task = ((FutureTask) this.i.poll()); ++ task.run(); ++ task.get(); + } catch (Throwable throwable) { +- MinecraftServer.LOGGER.fatal(throwable); ++ MinecraftServer.LOGGER.fatal("Handling task", throwable); ++ // CraftBukkit end + } + } + } this.methodProfiler.c("levels"); @@ -438,7 +453,7 @@ this.methodProfiler.a("tick"); -@@ -533,9 +709,9 @@ +@@ -533,9 +713,9 @@ worldserver.getTracker().updatePlayers(); this.methodProfiler.b(); this.methodProfiler.b(); @@ -450,7 +465,7 @@ } this.methodProfiler.c("connection"); -@@ -559,10 +735,11 @@ +@@ -559,10 +739,11 @@ this.o.add(iupdateplayerlistbox); } @@ -463,7 +478,7 @@ boolean flag = true; String s = null; String s1 = "."; -@@ -636,6 +813,27 @@ +@@ -636,6 +817,27 @@ dedicatedserver.B(); Runtime.getRuntime().addShutdownHook(new ThreadShutdown("Server Shutdown Thread", dedicatedserver)); @@ -491,7 +506,7 @@ } catch (Exception exception) { MinecraftServer.LOGGER.fatal("Failed to start the minecraft server", exception); } -@@ -643,8 +841,10 @@ +@@ -643,8 +845,10 @@ } public void B() { @@ -502,7 +517,7 @@ } public File d(String s) { -@@ -660,7 +860,14 @@ +@@ -660,7 +864,14 @@ } public WorldServer getWorldServer(int i) { @@ -518,7 +533,7 @@ } public String C() { -@@ -696,17 +903,62 @@ +@@ -696,17 +907,62 @@ } public String getPlugins() { @@ -588,7 +603,7 @@ } public void h(String s) { -@@ -721,7 +973,7 @@ +@@ -721,7 +977,7 @@ } public String getServerModName() { @@ -597,7 +612,7 @@ } public CrashReport b(CrashReport crashreport) { -@@ -734,6 +986,7 @@ +@@ -734,6 +990,7 @@ } public List tabCompleteCommand(ICommandListener icommandlistener, String s, BlockPosition blockposition) { @@ -605,7 +620,7 @@ ArrayList arraylist = Lists.newArrayList(); if (s.startsWith("/")) { -@@ -772,6 +1025,9 @@ +@@ -772,6 +1029,9 @@ return arraylist; } @@ -615,7 +630,7 @@ } public static MinecraftServer getServer() { -@@ -779,7 +1035,7 @@ +@@ -779,7 +1039,7 @@ } public boolean N() { @@ -624,7 +639,7 @@ } public String getName() { -@@ -835,8 +1091,10 @@ +@@ -835,8 +1095,10 @@ } public void a(EnumDifficulty enumdifficulty) { @@ -637,7 +652,7 @@ if (worldserver != null) { if (worldserver.getWorldData().isHardcore()) { -@@ -878,15 +1136,17 @@ +@@ -878,15 +1140,17 @@ this.N = true; this.getConvertable().d(); @@ -658,7 +673,7 @@ this.safeShutdown(); } -@@ -919,9 +1179,11 @@ +@@ -919,9 +1183,11 @@ int i = 0; if (this.worldServer != null) { @@ -673,7 +688,7 @@ WorldData worlddata = worldserver.getWorldData(); mojangstatisticsgenerator.a("world[" + i + "][dimension]", Integer.valueOf(worldserver.worldProvider.getDimension())); -@@ -954,7 +1216,7 @@ +@@ -954,7 +1220,7 @@ public abstract boolean ad(); public boolean getOnlineMode() { @@ -682,7 +697,7 @@ } public void setOnlineMode(boolean flag) { -@@ -1024,8 +1286,10 @@ +@@ -1024,8 +1290,10 @@ } public void setGamemode(EnumGamemode enumgamemode) { @@ -695,7 +710,7 @@ } } -@@ -1057,7 +1321,7 @@ +@@ -1057,7 +1325,7 @@ } public World getWorld() { @@ -704,7 +719,7 @@ } public Entity f() { -@@ -1125,11 +1389,10 @@ +@@ -1125,11 +1393,10 @@ } public Entity a(UUID uuid) { @@ -720,7 +735,7 @@ if (worldserver != null) { Entity entity = worldserver.getEntity(uuid); -@@ -1144,7 +1407,7 @@ +@@ -1144,7 +1411,7 @@ } public boolean getSendCommandFeedback() { |