⭐
StarAPI Documentation
  • ⭐API Information
    • ❔About Our API's
    • ⬇️Installing Our API
  • 🌟StarAPI (Spigot/Paper)
    • 📂Abilities
      • ⏳Transmition
      • 🤯Implosion
      • 🏹MultiShot
    • 📂Builders
      • 👕Armor Builder
      • 📊Bossbar Builder
      • ☄️Command Builder
      • ⚔️Item Builder
      • 🧟‍♂️Mob Builder
      • 💯Scoreboard Builder
      • 🔗Webhook Builder
      • 🔨Message Builder
      • 🏗️Actionbar Builder
    • 📂Files
      • 📃Create Files
      • 📁Create Folders
      • 📖Read Files
      • 🖊️Write Files
    • 📂Inventory Utilities
      • 💎Animated Items
      • 📖Book Content
      • 📔Book GUI
      • 🎞️Filler
      • 🪁Inventory Items
      • 📝Inventory Name
      • 💀Inventory Skulls
    • 📂Message Utilities
      • 🤖Auto Responses
      • 🎨Message Colors
    • 📂Recipes
      • ⚒️Crafting Recipes
      • 🧑‍🍳Furnace Recipes
    • 📂Timers
      • 🕙Active Timers
      • ❌Cancel Timers
      • 🕙Delayed Timers
      • 🕐Create Timers
    • 📂Misc
      • 💀Give Skulls
      • 📈Progress Bars
      • ⬛Block Placer
Powered by GitBook
On this page
  • Overview
  • Constructor
  • Methods
  • Usage
  • Example
  1. StarAPI (Spigot/Paper)
  2. Builders

Actionbar Builder

Create actionbars with ease

Overview

The ActionBarBuilder class provides a utility for sending action bar messages to players in a Minecraft Bukkit server environment. This class simplifies the process of creating and sending action bar messages with customizable content.

Constructor

ActionBarBuilder(JavaPlugin plugin)

public ActionBarBuilder(JavaPlugin plugin)

Creates a new instance of the ActionBarBuilder class.

Parameters

  • plugin: The JavaPlugin instance representing the plugin that owns this action bar builder.

Methods

message

public ActionBarBuilder message(String message)

Sets the message content for the action bar.

Parameters

  • message: The message content to be displayed in the action bar.

Returns

  • ActionBarBuilder: This ActionBarBuilder instance for method chaining.

send

public void send(Player player)

Sends the action bar message to the specified player.

Parameters

  • player: The player who will receive the action bar message.

clear

public void clear(Player player)

Clears the action bar message for the specified player.

Parameters

  • player: The player whose action bar message will be cleared.

Usage

  1. Create an instance of the ActionBarBuilder class, passing the JavaPlugin instance representing your plugin.

  2. Set the message content using the message method.

  3. Send the action bar message to a player using the send method.

  4. Optionally, clear the action bar message for a player using the clear method.

Example

// Create an instance of ActionBarBuilder
ActionBarBuilder actionBarBuilder = new ActionBarBuilder(myPlugin);

// Set the message content
actionBarBuilder.message("Hello, player!");

// Send the action bar message to a player
actionBarBuilder.send(player);
PreviousMessage BuilderNextFiles

Last updated 1 year ago

🌟
📂
🏗️