mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@9b1798d6 Simplify custom payload handling (#12347) PaperMC/Paper@2552abf0 fix message mutation in PlayerSetSpawnEvent PaperMC/Paper@ae99e24f fix deprecated bungee chat api methods PaperMC/Paper@dca4aab8 add util methods to CraftChatMessage PaperMC/Paper@87c9d9b0 be more lenient on url parsing for legacy format PaperMC/Paper@4a9bd2e3 Correctly clear items in PlayerDeathEvent PaperMC/Paper@a70f7745 fix unsaveable launched trident PaperMC/Paper@41a094cf move block data/state impl PaperMC/Paper@6b26b219 remove hardcoded durability from material PaperMC/Paper@db8c646d Merge remote-tracking branch 'origin/main' into update/1.21.5
51 lines
2.5 KiB
Diff
51 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Martijn Muijsers <martijnmuijsers@live.nl>
|
|
Date: Wed, 23 Nov 2022 20:28:07 +0100
|
|
Subject: [PATCH] Print stack trace for plugins not shutting down tasks
|
|
|
|
License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|
Gale - https://galemc.org
|
|
|
|
This patch is based on the following patch:
|
|
"More debug for plugins not shutting down tasks"
|
|
By: Paul Sauve <paul@technove.co>
|
|
As part of: Airplane (https://github.com/TECHNOVE/Airplane)
|
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|
|
|
* Airplane copyright *
|
|
|
|
Airplane
|
|
Copyright (C) 2020 Technove LLC
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index 63dd549a4560febb44d5b5dd7aed29a1f962403a..0a84d8cbdcd3513a83487a22ba81dc9e0535fc1b 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -1158,6 +1158,13 @@ public final class CraftServer implements Server {
|
|
plugin.getPluginMeta().getDisplayName(),
|
|
"This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies."
|
|
));
|
|
+ // Gale start - Airplane - print stack trace for plugins not shutting down tasks
|
|
+ getLogger().log(Level.SEVERE, String.format("%s Stacktrace", worker.getThread().getName()));
|
|
+
|
|
+ for (StackTraceElement element : worker.getThread().getStackTrace()) {
|
|
+ getLogger().log(Level.SEVERE, " " + element);
|
|
+ }
|
|
+ // Gale end - Airplane - print stack trace for plugins not shutting down tasks
|
|
if (console.isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread(worker.getThread(), "still running"); // Paper - Debugging
|
|
}
|
|
}
|