Convert name to lower case for removePermission; Fixes BUKKIT-3726

Permissions are stored as lower case names and referenced as such in all
appropriate methods but removePermission. This changes removePermission
to also convert names to lower case to be consistent with the rest of
the API.

By: Max A <maximilian.ammann@googlemail.com>
This commit is contained in:
Bukkit/Spigot 2013-01-13 12:25:50 +01:00
parent fce9b199e3
commit 63dc4b52b3

View file

@ -581,11 +581,11 @@ public final class SimplePluginManager implements PluginManager {
}
public void removePermission(Permission perm) {
removePermission(perm.getName().toLowerCase());
removePermission(perm.getName());
}
public void removePermission(String name) {
permissions.remove(name);
permissions.remove(name.toLowerCase());
}
public void recalculatePermissionDefaults(Permission perm) {