Class TakePermissionAction

java.lang.Object
io.github.lucfr1746.llibrary.action.Action
io.github.lucfr1746.llibrary.action.list.TakePermissionAction

public class TakePermissionAction extends Action
Represents an action that removes a permission from a player.
  • Constructor Details

    • TakePermissionAction

      public TakePermissionAction(String permission)
      Constructs a TakePermissionAction with a specified permission to remove.
      Parameters:
      permission - The permission to be removed.
  • Method Details

    • getPermission

      public String 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 class Action
      Parameters:
      target - The player from whom the permission will be removed.
      Throws:
      IllegalStateException - If there is no permission system hooked.