Interface ServerChannelChangeOverwrittenPermissionsEvent
-
- All Superinterfaces:
ChannelEvent,Event,ServerChannelEvent,ServerEvent
public interface ServerChannelChangeOverwrittenPermissionsEvent extends ServerChannelEvent
A server channel change overwritten permissions event.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.Optional<DiscordEntity>getEntity()Gets the entity which permissions were changed.longgetEntityId()Gets the if of the affected entity.PermissionsgetNewPermissions()Gets the new overwritten permissions.PermissionsgetOldPermissions()Gets the old overwritten permissions.java.util.Optional<Role>getRole()Gets the role which permissions were changed.java.util.Optional<User>getUser()Gets the user which permissions were changed.default booleanisRoleEntity()Checks if the affected entity is a role.default booleanisUserEntity()Checks if the affected entity is a user.-
Methods inherited from interface org.javacord.api.event.channel.server.ServerChannelEvent
getChannel, getServer
-
-
-
-
Method Detail
-
getNewPermissions
Permissions getNewPermissions()
Gets the new overwritten permissions.- Returns:
- The new permissions.
-
getOldPermissions
Permissions getOldPermissions()
Gets the old overwritten permissions.- Returns:
- The old permissions.
-
getEntityId
long getEntityId()
Gets the if of the affected entity.- Returns:
- The id of the affected entity.
-
isUserEntity
default boolean isUserEntity()
Checks if the affected entity is a user.- Returns:
- Whether the affected entity is a user.
-
isRoleEntity
default boolean isRoleEntity()
Checks if the affected entity is a role.- Returns:
- Whether the affected entity is a role.
-
getEntity
java.util.Optional<DiscordEntity> getEntity()
Gets the entity which permissions were changed. The entity is a user or a role.- Returns:
- The entity which permissions were changed.
-
getUser
java.util.Optional<User> getUser()
Gets the user which permissions were changed. Only present if the entity is a user!- Returns:
- The user which permissions were changed.
-
getRole
java.util.Optional<Role> getRole()
Gets the role which permissions were changed. Only present if the entity is a role!- Returns:
- The role which permissions were changed.
-
-