Search in sources :

Example 1 with IPermissionContainerMixin

use of net.dv8tion.jda.internal.entities.mixin.channel.attribute.IPermissionContainerMixin in project JDA by DV8FromTheWorld.

the class PermOverrideManagerImpl method getPermissionOverride.

@Nonnull
@Override
public PermissionOverride getPermissionOverride() {
    IPermissionContainerMixin<?> channel = (IPermissionContainerMixin<?>) override.getChannel();
    PermissionOverride realOverride = channel.getPermissionOverrideMap().get(override.getIdLong());
    if (realOverride != null)
        override = realOverride;
    return override;
}
Also used : PermissionOverride(net.dv8tion.jda.api.entities.PermissionOverride) IPermissionContainerMixin(net.dv8tion.jda.internal.entities.mixin.channel.attribute.IPermissionContainerMixin) Nonnull(javax.annotation.Nonnull) PermissionOverride(net.dv8tion.jda.api.entities.PermissionOverride)

Aggregations

Nonnull (javax.annotation.Nonnull)1 PermissionOverride (net.dv8tion.jda.api.entities.PermissionOverride)1 IPermissionContainerMixin (net.dv8tion.jda.internal.entities.mixin.channel.attribute.IPermissionContainerMixin)1