🏗️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)
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
messagepublic 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: ThisActionBarBuilderinstance for method chaining.
send
sendSends the action bar message to the specified player.
Parameters
player: The player who will receive the action bar message.
clear
clearClears the action bar message for the specified player.
Parameters
player: The player whose action bar message will be cleared.
Usage
Create an instance of the
ActionBarBuilderclass, passing the JavaPlugin instance representing your plugin.Set the message content using the
messagemethod.Send the action bar message to a player using the
sendmethod.Optionally, clear the action bar message for a player using the
clearmethod.
Example
Last updated