|
|
|
@ -75,27 +75,19 @@ public class DefaultPermissionsProvider implements ICommandPermissionsProvider
|
|
|
|
|
public void setUserPermission(IGuild guild, IUser user, Command command, Boolean value)
|
|
|
|
|
{
|
|
|
|
|
if(value == null) // Unset
|
|
|
|
|
{
|
|
|
|
|
userStore.remove(generateUserKey(guild, user, command));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
userStore.put(generateUserKey(guild, user, command), value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void setGroupPermissions(IRole role, Command command, Boolean value)
|
|
|
|
|
{
|
|
|
|
|
if(value == null) // Unset
|
|
|
|
|
{
|
|
|
|
|
groupStore.remove(generateGroupKey(role, command));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
groupStore.put(generateGroupKey(role, command), value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String generateUserKey(IGuild guild, IUser user, Command command)
|
|
|
|
|
{
|
|
|
|
|