Package net.dv8tion.jda.core.entities
Interface IPermissionHolder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Guild
getGuild()
The Guild to which this PermissionHolder is relatedjava.util.List<Permission>
getPermissions()
The Guild-Wide Permissions this PermissionHolder holds.boolean
hasPermission(java.util.Collection<Permission> permissions)
Checks whether or not this PermissionHolder has thePermissions
in the providedCollection<Permission>
in the Guild.boolean
hasPermission(Channel channel, java.util.Collection<Permission> permissions)
Checks whether or not this PermissionHolder has thePermissions
in the providedCollection<Permission>
in the specified Channel.boolean
hasPermission(Channel channel, Permission... permissions)
Checks whether or not this PermissionHolder has the givenPermissions
in the specified Channel.boolean
hasPermission(Permission... permissions)
Checks whether or not this PermissionHolder has the givenPermissions
in the Guild.
-
-
-
Method Detail
-
getGuild
Guild getGuild()
The Guild to which this PermissionHolder is related- Returns:
- A never-null Guild to which this PermissionHolder is linked
-
getPermissions
java.util.List<Permission> getPermissions()
The Guild-Wide Permissions this PermissionHolder holds.- Returns:
- An immutable List of Permissions granted to this PermissionHolder.
-
hasPermission
boolean hasPermission(Permission... permissions)
Checks whether or not this PermissionHolder has the givenPermissions
in the Guild.- Parameters:
permissions
- Permissions to check for.- Returns:
- True, if all of the specified Permissions are granted to this PermissionHolder.
-
hasPermission
boolean hasPermission(java.util.Collection<Permission> permissions)
Checks whether or not this PermissionHolder has thePermissions
in 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(Channel channel, Permission... permissions)
Checks whether or not this PermissionHolder has the givenPermissions
in the specified Channel.- Parameters:
channel
- TheChannel
in which to check.permissions
- Permissions to check for.- Returns:
- True, if all of the specified Permissions are granted to this PermissionHolder in the provided Channel.
- See Also:
EnumSet
-
hasPermission
boolean hasPermission(Channel channel, java.util.Collection<Permission> permissions)
Checks whether or not this PermissionHolder has thePermissions
in the providedCollection<Permission>
in the specified Channel.- Parameters:
channel
- TheChannel
in which to check.permissions
- Permissions to check for.- Returns:
- True, if all of the specified Permissions are granted to this PermissionHolder in the provided Channel.
-
-