💯Scoreboard Builder
Create scoreboards with ease
Overview
The ScoreboardBuilder class simplifies the creation and management of scoreboards for players in a Minecraft Bukkit server environment. It provides methods for setting scoreboard lines with associated scores, allowing for easy customization and display of player information or game stats.
Constructor
ScoreboardBuilder
ScoreboardBuilderpublic ScoreboardBuilder(Player player, String displayName, JavaPlugin plugin)Initializes a new instance of the ScoreboardBuilder class with the specified player, display name, and JavaPlugin instance.
Parameters
player: The player for whom the scoreboard is created.displayName: The display name of the scoreboard.plugin: The JavaPlugin instance associated with the scoreboard builder.
Methods
setLine
setLinepublic ScoreboardBuilder setLine(int score, String text)Sets a line with the specified score and text on the scoreboard.
Parameters
score: The score associated with the line.text: The text to be displayed on the line.
build
buildpublic void build()Builds and displays the scoreboard for the player with the configured lines and scores.
Notes
The
ScoreboardBuilderclass provides a convenient way to create and customize scoreboards for players.Developers can use the
setLinemethod to add lines with associated scores to the scoreboard.Once configured, the scoreboard can be built and displayed for the player using the
buildmethod.Custom scoreboards created using this builder pattern can enhance gameplay by providing players with relevant information or game statistics during gameplay.
Last updated