geforkt von Mirrors/Paper
Fix custom permissions reloading (#1325)
Dieser Commit ist enthalten in:
Ursprung
f8056bec6d
Commit
a7b0bc2b1b
@ -6,7 +6,7 @@ Subject: [PATCH] Add configuration option to prevent player names from being
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 9f1182c723..e97dbaf8e3 100644
|
||||
index 9f1182c72..e97dbaf8e 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperConfig {
|
||||
@ -20,7 +20,7 @@ index 9f1182c723..e97dbaf8e3 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 6470135f77..f1a4f4529c 100644
|
||||
index 84057ebfb..18829f303 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||
|
@ -6,12 +6,12 @@ Subject: [PATCH] Allow Reloading of Command Aliases
|
||||
Reload the aliases stored in commands.yml
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7a7617750e..6470135f77 100644
|
||||
index a869757b9..84057ebfb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||
});
|
||||
}
|
||||
DefaultPermissions.registerCorePermissions();
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
|
@ -6,7 +6,7 @@ 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 ed823bef1..6c5357cd1 100644
|
||||
index ed823bef1..4dd49110a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||
@ -16,17 +16,20 @@ index ed823bef1..6c5357cd1 100644
|
||||
+
|
||||
+ @Override
|
||||
+ public void reloadPermissions() {
|
||||
+ ((SimplePluginManager) pluginManager).clearPermissions();
|
||||
+ loadCustomPermissions();
|
||||
+ pluginManager.clearPermissions();
|
||||
+ if (com.destroystokyo.paper.PaperConfig.loadPermsBeforePlugins) loadCustomPermissions();
|
||||
+ for (Plugin plugin : pluginManager.getPlugins()) {
|
||||
+ plugin.getDescription().getPermissions().forEach((perm) -> {
|
||||
+ 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
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ Establishes base extension of profile systems for future edits too
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java
|
||||
new file mode 100644
|
||||
index 0000000000..b151a13c1b
|
||||
index 000000000..b151a13c1
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@ -293,7 +293,7 @@ index 0000000000..b151a13c1b
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java
|
||||
new file mode 100644
|
||||
index 0000000000..25836b975b
|
||||
index 000000000..25836b975
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@ -329,7 +329,7 @@ index 0000000000..25836b975b
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java
|
||||
new file mode 100644
|
||||
index 0000000000..3bcdb8f93f
|
||||
index 000000000..3bcdb8f93
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@ -352,7 +352,7 @@ index 0000000000..3bcdb8f93f
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java
|
||||
new file mode 100644
|
||||
index 0000000000..4b2a67423f
|
||||
index 000000000..4b2a67423
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@ -387,7 +387,7 @@ index 0000000000..4b2a67423f
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java b/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java
|
||||
new file mode 100644
|
||||
index 0000000000..3aceb0ea8a
|
||||
index 000000000..3aceb0ea8
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@ -403,7 +403,7 @@ index 0000000000..3aceb0ea8a
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
index 381542e0d2..80927de08b 100644
|
||||
index 381542e0d..80927de08 100644
|
||||
--- a/src/main/java/net/minecraft/server/MCUtil.java
|
||||
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@ -428,7 +428,7 @@ index 381542e0d2..80927de08b 100644
|
||||
* Calculates distance between 2 entities
|
||||
* @param e1
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f88ba7db7f..a2e685acf7 100644
|
||||
index 5635997d0..02b621880 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@ -449,7 +449,7 @@ index f88ba7db7f..a2e685acf7 100644
|
||||
return this.V;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java
|
||||
index a47a51a412..4c476f757c 100644
|
||||
index a47a51a41..4c476f757 100644
|
||||
--- a/src/main/java/net/minecraft/server/UserCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/UserCache.java
|
||||
@@ -0,0 +0,0 @@ public class UserCache {
|
||||
@ -485,7 +485,7 @@ index a47a51a412..4c476f757c 100644
|
||||
|
||||
private UserCacheEntry(GameProfile gameprofile, Date date) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 237d7696c7..7157a5b136 100644
|
||||
index 79524885d..ee7f16ca3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren