Move to configurate for paper.yml (#7609)
This commit is contained in:
parent
da8027352c
commit
172d260d67
872 changed files with 5923 additions and 5664 deletions
|
@ -15,29 +15,15 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe
|
|||
|
||||
A config option has been added for those who depend on the previous behavior, but I don't expect that.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 7bbcee19248933f67fd40f46db43363890593c73..16707c734f33f6080875e5e3ea338affe2d2fa0c 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -234,4 +234,9 @@ public class PaperConfig {
|
||||
" - Length: " + timeSummary(Timings.getHistoryLength() / 20) +
|
||||
" - Server Name: " + timingsServerName);
|
||||
}
|
||||
+
|
||||
+ public static boolean loadPermsBeforePlugins = true;
|
||||
+ private static void loadPermsBeforePlugins() {
|
||||
+ loadPermsBeforePlugins = getBoolean("settings.load-permissions-yml-before-plugins", true);
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index ff7f1347619d4df2a5c217a4b6545878ed81293c..c4860d85eb0a1cab7786982969d58a5729bc93c9 100644
|
||||
index a8b963b336045c11c71dfff4e0ad0d66a9b47a92..c5095243aad4fc39bbdc8784837b111993f8b9e3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -451,6 +451,7 @@ public final class CraftServer implements Server {
|
||||
if (type == PluginLoadOrder.STARTUP) {
|
||||
this.helpMap.clear();
|
||||
this.helpMap.initializeGeneralTopics();
|
||||
+ if (com.destroystokyo.paper.PaperConfig.loadPermsBeforePlugins) loadCustomPermissions(); // Paper
|
||||
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().misc.loadPermissionsYmlBeforePlugins) loadCustomPermissions(); // Paper
|
||||
}
|
||||
|
||||
Plugin[] plugins = this.pluginManager.getPlugins();
|
||||
|
@ -46,7 +32,7 @@ index ff7f1347619d4df2a5c217a4b6545878ed81293c..c4860d85eb0a1cab7786982969d58a57
|
|||
DefaultPermissions.registerCorePermissions();
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
- this.loadCustomPermissions();
|
||||
+ if (!com.destroystokyo.paper.PaperConfig.loadPermsBeforePlugins) this.loadCustomPermissions(); // Paper
|
||||
+ if (!io.papermc.paper.configuration.GlobalConfiguration.get().misc.loadPermissionsYmlBeforePlugins) this.loadCustomPermissions(); // Paper
|
||||
this.helpMap.initializeCommands();
|
||||
this.syncCommands();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue