Class GivePermissionAction
java.lang.Object
io.github.lucfr1746.llibrary.action.Action
io.github.lucfr1746.llibrary.action.list.GivePermissionAction
Represents an action that grants a permission to a player.
-
Constructor Summary
ConstructorsConstructorDescriptionGivePermissionAction(String permission) Constructs a GivePermissionAction with the specified permission. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(org.bukkit.entity.Player target) Executes the action, granting the specified permission to the target player.Gets the permission that will be granted.
-
Constructor Details
-
GivePermissionAction
Constructs a GivePermissionAction with the specified permission.- Parameters:
permission- The permission to grant to the player.
-
-
Method Details
-
getPermission
Gets the permission that will be granted.- Returns:
- The permission string.
-
execute
public void execute(org.bukkit.entity.Player target) Executes the action, granting the specified permission to the target player.- Specified by:
executein classAction- Parameters:
target- The player who will receive the permission.- Throws:
IllegalStateException- if there is no permission system hooked.
-