Package io.manebot.entity
Interface EntityType
-
- All Known Subinterfaces:
Conversation
,User
,UserGroup
- All Known Implementing Classes:
Conversation
,Group
,User
public interface EntityType
-
-
Method Summary
Modifier and Type Method Description default void
checkPermission(Permission permission)
default void
checkPermission(Permission permission, Grant fallback)
default void
checkPermission(java.lang.String node)
default void
checkPermission(java.lang.String node, Grant fallback)
Entity
getEntity()
Gets the entity associated with this object.default boolean
hasPermission(Permission permission)
Finds if this entity has a specific permissiondefault boolean
hasPermission(Permission permission, Grant fallback)
Finds if this entity has a specific permissiondefault boolean
hasPermission(java.lang.String node)
Finds if this entity has a specific permission nodedefault boolean
hasPermission(java.lang.String node, Grant fallback)
Finds if this entity has a specific permission
-
-
-
Method Detail
-
getEntity
Entity getEntity()
Gets the entity associated with this object.- Returns:
- Associated entity.
-
hasPermission
default boolean hasPermission(java.lang.String node)
Finds if this entity has a specific permission node- Parameters:
node
- permission node to check for.- Returns:
- true if the permission node is granted, false otherwise.
-
hasPermission
default boolean hasPermission(Permission permission)
Finds if this entity has a specific permission- Parameters:
permission
- Permission to check for.- Returns:
- true if the permission is granted, false otherwise.
-
hasPermission
default boolean hasPermission(java.lang.String node, Grant fallback)
Finds if this entity has a specific permission- Parameters:
node
- Permission node to check for.- Returns:
- true if the permission is granted, false otherwise.
-
hasPermission
default boolean hasPermission(Permission permission, Grant fallback)
Finds if this entity has a specific permission- Parameters:
permission
- Permission to check for.- Returns:
- true if the permission is granted, false otherwise.
-
checkPermission
default void checkPermission(Permission permission) throws java.lang.SecurityException
- Throws:
java.lang.SecurityException
-
checkPermission
default void checkPermission(java.lang.String node) throws java.lang.SecurityException
- Throws:
java.lang.SecurityException
-
checkPermission
default void checkPermission(Permission permission, Grant fallback) throws java.lang.SecurityException
- Throws:
java.lang.SecurityException
-
checkPermission
default void checkPermission(java.lang.String node, Grant fallback) throws java.lang.SecurityException
- Throws:
java.lang.SecurityException
-
-