Interface PermissionOverride

    • Method Detail

      • getAllowedRaw

        long getAllowedRaw()
        This is the raw binary representation (as a base 10 long) of the permissions allowed by this override.
        The long relates to the offsets used by each Permission.
        Returns:
        Never-negative long containing the binary representation of the allowed permissions of this override.
      • getInheritRaw

        long getInheritRaw()
        This is the raw binary representation (as a base 10 long) of the permissions not affected by this override.
        The long relates to the offsets used by each Permission.
        Returns:
        Never-negative long containing the binary representation of the unaffected permissions of this override.
      • getDeniedRaw

        long getDeniedRaw()
        This is the raw binary representation (as a base 10 long) of the permissions denied by this override.
        The long relates to the offsets used by each Permission.
        Returns:
        Never-negative long containing the binary representation of the denied permissions of this override.
      • getAllowed

        @Nonnull
        EnumSet<Permission> getAllowed()
        EnumSet of all Permissions that are specifically allowed by this override.
        Changes to the returned set do not affect this entity directly.
        Returns:
        Possibly-empty set of allowed Permissions.
      • getInherit

        @Nonnull
        EnumSet<Permission> getInherit()
        EnumSet of all Permission that are unaffected by this override.
        Changes to the returned set do not affect this entity directly.
        Returns:
        Possibly-empty set of unaffected Permissions.
      • getJDA

        @Nonnull
        JDA getJDA()
        The JDA instance that this PermissionOverride is related to.
        Returns:
        Never-null JDA instance.
      • getMember

        @Nullable
        Member getMember()
        If this PermissionOverride is an override dealing with a Member, then this method will return the related Member if the member is currently cached.
        Otherwise, this method returns null.
        Basically: if isMemberOverride() returns false or the member is not cached, this returns null.
        Returns:
        Possibly-null related Member.
      • getRole

        @Nullable
        Role getRole()
        If this PermissionOverride is an override dealing with a Role, then this method will return the related Role.
        Otherwise, this method returns null.
        Basically: if isRoleOverride() returns false, this returns null.
        Returns:
        Possibly-null related Role.
      • isMemberOverride

        boolean isMemberOverride()
        Used to determine if this PermissionOverride relates to a specific Member.
        Returns:
        True if this override is a user override.
      • isRoleOverride

        boolean isRoleOverride()
        Used to determine if this PermissionOverride relates to a specific Role.
        Returns:
        True if this override is a role override.