geforkt von Mirrors/Paper
Speed up permission recalculation.
Based on ideas in PR #102, but rewritten for correctness. By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
441f6fa9c2
Commit
ef91dacfe8
@ -52,6 +52,7 @@ public class Permission {
|
||||
}
|
||||
|
||||
public Permission(String name, String description, PermissionDefault defaultValue, Map<String, Boolean> children) {
|
||||
Validate.notNull(name, "Name cannot be null");
|
||||
this.name = name;
|
||||
this.description = (description == null) ? "" : description;
|
||||
|
||||
|
@ -615,7 +615,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
}
|
||||
|
||||
public void recalculatePermissionDefaults(Permission perm) {
|
||||
if (permissions.containsValue(perm)) {
|
||||
if (perm != null && permissions.containsKey(perm.getName().toLowerCase())) {
|
||||
defaultPerms.get(true).remove(perm);
|
||||
defaultPerms.get(false).remove(perm);
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren