Class TakePermissionAction
java.lang.Object
io.github.lucfr1746.llibrary.action.Action
io.github.lucfr1746.llibrary.action.list.TakePermissionAction
Represents an action that removes a permission from a player.
-
Constructor Summary
ConstructorsConstructorDescriptionTakePermissionAction
(String permission) Constructs a TakePermissionAction with a specified permission to remove. -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(org.bukkit.entity.Player target) Executes the action, removing the specified permission from the target player.Gets the permission that will be removed from the player.
-
Constructor Details
-
TakePermissionAction
Constructs a TakePermissionAction with a specified permission to remove.- Parameters:
permission
- The permission to be removed.
-
-
Method Details
-
getPermission
Gets the permission that will be removed from the player.- Returns:
- The permission string.
-
execute
public void execute(org.bukkit.entity.Player target) Executes the action, removing the specified permission from the target player. If the permission system is not available, an exception is thrown.- Specified by:
execute
in classAction
- Parameters:
target
- The player from whom the permission will be removed.- Throws:
IllegalStateException
- If there is no permission system hooked.
-