geforkt von Mirrors/Paper
3496f2d7e4
Developers!: You will need to clean up your work/Minecraft/1.13.2 folder for this 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: b850a822 SPIGOT-4526: Add conversion time API for Zombie & subclasses CraftBukkit Changes:38cf676e
SPIGOT-4534: CreatureSpawnEvent not being called for CHUNK_GENb446cb5d
SPIGOT-4527: Fix sponges with waterlogged blocks6ec8ea5c
SPIGOT-4526: Add conversion time API for Zombie & subclassesc64fe508
Mappings Updatea3c2ec03
Fix missing ServerListPingEvent call for legacy pings Spigot Changes: 1dc156ce Rebuild patches 140f654d Mappings Update
39 Zeilen
1.6 KiB
Diff
39 Zeilen
1.6 KiB
Diff
From f3c64acdb1626e3c83b9b962dd648cc43426b85a 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 bcd8ba4ad..70c3cde24 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -2052,5 +2052,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.20.0
|
|
|