Port Sponge's heap dump command feature to Paper

To dump the server heap, run the following command:
`/paper heap`

This is added with the intent that it is useful for administrators and
developers to more easily identify and resolve memory leaks. Both by examining
these dumps themselves and by more easily allowing them to send them to
knowledgable parties.

This is a nearly line-for-line port of the same Sponge feature. So all
credit for the idea and implementation belongs to the that team.

Specifically the following commits:
be08be04b0
5e10a1b795
This commit is contained in:
Zach Brown
2017-07-15 18:59:18 -05:00
parent e35d569526
commit 8bc0a37de6
4 changed files with 73 additions and 27 deletions

View File

@@ -6,15 +6,14 @@ 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 0f6038972..b8f907038 100644
index cc8af9491..a695355dd 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 {
{
return spigot;
Bukkit.getLogger().severe("Could not write heap to " + file);
}
}
+
+ // Paper start
+ @Override
+ public void reloadPermissions() {
+ ((SimplePluginManager) pluginManager).clearPermissions();
@@ -29,6 +28,6 @@ index 0f6038972..b8f907038 100644
+ });
+ }
+ }
+ // Paper end
// Paper end
}
--