geforkt von Mirrors/Paper
5938592845
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
36 Zeilen
1.4 KiB
Diff
36 Zeilen
1.4 KiB
Diff
From b7e59de5e65ebabf3ccf76ef226416d49123fac6 Mon Sep 17 00:00:00 2001
|
|
From: William <admin@domnian.com>
|
|
Date: Fri, 18 Mar 2016 03:30:17 -0400
|
|
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 cc8af9491..a695355dd 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -1848,5 +1848,20 @@ public final class CraftServer implements Server {
|
|
Bukkit.getLogger().severe("Could not write heap to " + file);
|
|
}
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public void reloadPermissions() {
|
|
+ ((SimplePluginManager) pluginManager).clearPermissions();
|
|
+ loadCustomPermissions();
|
|
+ for (Plugin plugin : pluginManager.getPlugins()) {
|
|
+ plugin.getDescription().getPermissions().forEach((perm) -> {
|
|
+ try {
|
|
+ pluginManager.addPermission(perm);
|
|
+ } catch (IllegalArgumentException ex) {
|
|
+ getLogger().log(Level.WARNING, "Plugin " + plugin.getDescription().getFullName() + " tried to register permission '" + perm.getName() + "' but it's already registered", ex);
|
|
+ }
|
|
+ });
|
|
+ }
|
|
+ }
|
|
// Paper end
|
|
}
|
|
--
|
|
2.13.3.windows.1
|
|
|