Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 04:50:05 +01:00
d617f95f05
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
310dc809 Add ServerLoadEvent
CraftBukkit Changes:
19d654bd
Add ServerLoadEvent
39 Zeilen
1.6 KiB
Diff
39 Zeilen
1.6 KiB
Diff
From 310cdd2f148724896eadca0daa2c2d29a311f65e 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 53914172b1..f5640574d0 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -1976,5 +1976,23 @@ public final class CraftServer implements Server {
|
|
return false;
|
|
}
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public void reloadPermissions() {
|
|
+ pluginManager.clearPermissions();
|
|
+ if (com.destroystokyo.paper.PaperConfig.loadPermsBeforePlugins) loadCustomPermissions();
|
|
+ for (Plugin plugin : pluginManager.getPlugins()) {
|
|
+ for (Permission perm : plugin.getDescription().getPermissions()) {
|
|
+ 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);
|
|
+ }
|
|
+ }
|
|
+ }
|
|
+ if (!com.destroystokyo.paper.PaperConfig.loadPermsBeforePlugins) loadCustomPermissions();
|
|
+ DefaultPermissions.registerCorePermissions();
|
|
+ CraftDefaultPermissions.registerCorePermissions();
|
|
+ }
|
|
// Paper end
|
|
}
|
|
--
|
|
2.18.0
|
|
|