diff --git a/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch index ea78085f86..33c902677e 100644 --- a/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch @@ -20,7 +20,7 @@ index 28917f63d..f4b237034 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6dba269e7..3e5421932 100644 +index 3d484fbcf..3c6f46057 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch index f8daba6bfe..cd96db0321 100644 --- a/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Command Aliases Reload the aliases stored in commands.yml diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 5a9555135..6dba269e7 100644 +index 37dc16186..3d484fbcf 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch index 0ef8bc4b4f..969543764d 100644 --- a/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch @@ -6,11 +6,11 @@ Subject: [PATCH] Allow Reloading of Custom Permissions https://github.com/PaperMC/Paper/issues/49 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 815a26284..7a2c19159 100644 +index 3007a724b..e8b8e86e8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { - Bukkit.getLogger().severe("Could not write heap to " + file); + return false; } } + diff --git a/Spigot-Server-Patches/Paper-config-files.patch b/Spigot-Server-Patches/Paper-config-files.patch index 366d19f3eb..1162789e81 100644 --- a/Spigot-Server-Patches/Paper-config-files.patch +++ b/Spigot-Server-Patches/Paper-config-files.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Paper config files diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java new file mode 100644 -index 000000000..cd67ab2bb +index 000000000..5cdf4bbf4 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -0,0 +0,0 @@ @@ -62,10 +62,13 @@ index 000000000..cd67ab2bb + + private void dumpHeap(CommandSender sender) { + File file = new File(new File(new File("."), "dumps"), -+ "heap-dump-" + DateTimeFormatter.ofPattern("yyyy-MM-dd_HH.mm.ss").format(LocalDateTime.now()) + "-server.bin"); ++ "heap-dump-" + DateTimeFormatter.ofPattern("yyyy-MM-dd_HH.mm.ss").format(LocalDateTime.now()) + "-server.hprof"); + Command.broadcastCommandMessage(sender, ChatColor.YELLOW + "Writing JVM heap data to " + file); -+ CraftServer.dumpHeap(file); -+ Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Heap dump complete"); ++ if (CraftServer.dumpHeap(file)) { ++ Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Heap dump complete"); ++ } else { ++ Command.broadcastCommandMessage(sender, ChatColor.RED + "Failed to write heap dump, see sever log for details"); ++ } + } + + private void doReload(CommandSender sender) { @@ -370,7 +373,7 @@ index f5d387511..fd204ad7a 100644 this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e21fb9bd7..d7af2c00f 100644 +index e21fb9bd7..dd50d5c56 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -404,7 +407,7 @@ index e21fb9bd7..d7af2c00f 100644 + + // Paper start + @SuppressWarnings({"rawtypes", "unchecked"}) -+ public static void dumpHeap(File file) { ++ public static boolean dumpHeap(File file) { + try { + if (file.getParentFile() != null) { + file.getParentFile().mkdirs(); @@ -415,8 +418,11 @@ index e21fb9bd7..d7af2c00f 100644 + Object hotspotMBean = java.lang.management.ManagementFactory.newPlatformMXBeanProxy(server, "com.sun.management:type=HotSpotDiagnostic", clazz); + java.lang.reflect.Method m = clazz.getMethod("dumpHeap", String.class, boolean.class); + m.invoke(hotspotMBean, file.getPath(), true); ++ return true; + } catch (Throwable t) { + Bukkit.getLogger().severe("Could not write heap to " + file); ++ t.printStackTrace(); ++ return false; + } + } + // Paper end