Remove the 'command' from the permission check
This commit is contained in:
parent
07bcf29862
commit
a34f8e1e7e
@ -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)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user