3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 19:10:09 +01:00

Fix dumplisteners missing folder creation

Dieser Commit ist enthalten in:
Shane Freeder 2022-12-06 04:02:44 +00:00
Ursprung 96fdafd935
Commit 407a445aac
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A3F61EA5A085289C

Datei anzeigen

@ -27,10 +27,10 @@ index 724592234e2a178a518f6ab7d09c3180780371a7..92154550b41b2e1d03deb1271b71bb3b
.flatMap(entry -> entry.getKey().stream().map(s -> Map.entry(s, entry.getValue())))
diff --git a/src/main/java/io/papermc/paper/command/subcommands/DumpListenersCommand.java b/src/main/java/io/papermc/paper/command/subcommands/DumpListenersCommand.java
new file mode 100644
index 0000000000000000000000000000000000000000..c80485b9b0c189820687b3a8ff66a855a4b1efa7
index 0000000000000000000000000000000000000000..aa44d4685de3caee4131449bead7a084868ff976
--- /dev/null
+++ b/src/main/java/io/papermc/paper/command/subcommands/DumpListenersCommand.java
@@ -0,0 +1,171 @@
@@ -0,0 +1,172 @@
+package io.papermc.paper.command.subcommands;
+
+import com.destroystokyo.paper.util.SneakyThrow;
@ -93,6 +93,7 @@ index 0000000000000000000000000000000000000000..c80485b9b0c189820687b3a8ff66a855
+ private void dumpToFile(final CommandSender sender) {
+ final File file = new File("debug/listeners-"
+ + DateTimeFormatter.ofPattern("yyyy-MM-dd_HH.mm.ss").format(LocalDateTime.now()) + ".txt");
+ file.getParentFile().mkdirs();
+ try (final PrintWriter writer = new PrintWriter(file)) {
+ for (final String eventClass : eventClassNames()) {
+ final HandlerList handlers;