Package net.dv8tion.jda.api.entities
Interface IPermissionHolder
-
- All Superinterfaces:
ISnowflake
public interface IPermissionHolder extends ISnowflake
Marker for entities that hold Permissions within JDA- Since:
- 3.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GuildgetGuild()The Guild to which this PermissionHolder is relatedEnumSet<Permission>getPermissions()The Guild-Wide Permissions this PermissionHolder holds.booleanhasPermission(Collection<Permission> permissions)Checks whether or not this PermissionHolder has thePermissionsin the providedCollection<Permission>in the Guild.booleanhasPermission(GuildChannel channel, Collection<Permission> permissions)Checks whether or not this PermissionHolder has thePermissionsin the providedCollection<Permission>in the specified GuildChannel.booleanhasPermission(GuildChannel channel, Permission... permissions)Checks whether or not this PermissionHolder has the givenPermissionsin the specified GuildChannel.booleanhasPermission(Permission... permissions)Checks whether or not this PermissionHolder has the givenPermissionsin the Guild.-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
-
-
-
Method Detail
-
getGuild
@Nonnull Guild getGuild()
The Guild to which this PermissionHolder is related- Returns:
- A never-null Guild to which this PermissionHolder is linked
-
getPermissions
@Nonnull EnumSet<Permission> getPermissions()
The Guild-Wide Permissions this PermissionHolder holds.
Changes to the returned set do not affect this entity directly.- Returns:
- An EnumSet of Permissions granted to this PermissionHolder.
-
hasPermission
boolean hasPermission(@Nonnull Permission... permissions)
Checks whether or not this PermissionHolder has the givenPermissionsin the Guild.- Parameters:
permissions- Permissions to check for.- Returns:
- True, if all of the specified Permissions are granted to this PermissionHolder.
-
hasPermission
boolean hasPermission(@Nonnull Collection<Permission> permissions)
Checks whether or not this PermissionHolder has thePermissionsin the providedCollection<Permission>in the Guild.- Parameters:
permissions- Permissions to check for.- Returns:
- True, if all of the specified Permissions are granted to this PermissionHolder.
- See Also:
EnumSet
-
hasPermission
boolean hasPermission(@Nonnull GuildChannel channel, @Nonnull Permission... permissions)
Checks whether or not this PermissionHolder has the givenPermissionsin the specified GuildChannel.- Parameters:
channel- TheGuildChannelin which to check.permissions- Permissions to check for.- Returns:
- True, if all of the specified Permissions are granted to this PermissionHolder in the provided GuildChannel.
- See Also:
EnumSet
-
hasPermission
boolean hasPermission(@Nonnull GuildChannel channel, @Nonnull Collection<Permission> permissions)
Checks whether or not this PermissionHolder has thePermissionsin the providedCollection<Permission>in the specified GuildChannel.- Parameters:
channel- TheGuildChannelin which to check.permissions- Permissions to check for.- Returns:
- True, if all of the specified Permissions are granted to this PermissionHolder in the provided GuildChannel.
-
-