Remove the 'command' from the permission check

This commit is contained in:
libraryaddict 2014-07-11 11:25:55 +12:00
parent 07bcf29862
commit a34f8e1e7e

View File

@ -47,7 +47,7 @@ public abstract class BaseDisguiseCommand implements CommandExecutor {
case FISHING_HOOK: case FISHING_HOOK:
case DROPPED_ITEM: case DROPPED_ITEM:
ArrayList<String> returns = new ArrayList<String>(); ArrayList<String> returns = new ArrayList<String>();
String beginning = "libsdisguises.options." + getClass().getSimpleName().toLowerCase() + "."; String beginning = "libsdisguises.options." + getClass().getSimpleName().toLowerCase().replace("command", "") + ".";
for (PermissionAttachmentInfo permission : sender.getEffectivePermissions()) { for (PermissionAttachmentInfo permission : sender.getEffectivePermissions()) {
String lowerPerm = permission.getPermission().toLowerCase(); String lowerPerm = permission.getPermission().toLowerCase();
if (lowerPerm.startsWith(beginning)) { if (lowerPerm.startsWith(beginning)) {