Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 20:40:07 +01:00
b62dfa0bf9
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: 39ce5d3a SPIGOT-4399: ItemMeta.equals broken with AttributeModifiers CraftBukkit Changes:1cf8b5dc
SPIGOT-4400: Populators running on existing chunks116cb9a1
SPIGOT-4399: Add attribute modifier equality test5ee1c18a
SPIGOT-4398: Set ASM7_EXPERIMENTAL flag
39 Zeilen
1.6 KiB
Diff
39 Zeilen
1.6 KiB
Diff
From 34257015af334cb3e1e2f7f98ebf3085d24b5f13 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 385063d8aa..583e31d59b 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -2003,5 +2003,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.19.0
|
|
|