From 407a445aacbc6d3dd2993e495064800ffff7dddf Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Tue, 6 Dec 2022 04:02:44 +0000 Subject: [PATCH] Fix dumplisteners missing folder creation --- patches/server/0943-Add-paper-dumplisteners-command.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/patches/server/0943-Add-paper-dumplisteners-command.patch b/patches/server/0943-Add-paper-dumplisteners-command.patch index a5ac06d05..c59dba629 100644 --- a/patches/server/0943-Add-paper-dumplisteners-command.patch +++ b/patches/server/0943-Add-paper-dumplisteners-command.patch @@ -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;