ricardoboss/GameModeControl

.self / .others permissions not working

Closed this issue · 2 comments

Hello,

It looks like there's a discrepancy causing a miss when permissions are only specified for gmc.<permission>.self or gmc.<permission>.others:

Commands.Gamemode() is evaluating permissions using
Permissions.Perm.fromString(args[args.length-1] + ".self")
or
Permissions.Perm.fromString(args[args.length-1] + ".others")

but Permissions.Perm.fromString() is expecting an underscore instead of a period, e.g.
case "gamemode_self": return GAMEMODE_SELF;
case "gamemode_others": return GAMEMODE_OTHERS;

Thanks for taking a look (and thanks for the plugin!)

I'll have a look at this later. Thanks for pointing that out! Btw, if you want to, you can fork GMC, fix this yourself and make a pull request. That's why it is on GitHub, right?