> For the complete documentation index, see [llms.txt](https://glitchtechs.gitbook.io/galaxy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://glitchtechs.gitbook.io/galaxy/starapi-spigot-paper/builders/scoreboard-builder.md).

# 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`

```java
public 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`

```java
public 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`

```java
public void build()
```

Builds and displays the scoreboard for the player with the configured lines and scores.

### Notes

* The `ScoreboardBuilder` class provides a convenient way to create and customize scoreboards for players.
* Developers can use the `setLine` method to add lines with associated scores to the scoreboard.
* Once configured, the scoreboard can be built and displayed for the player using the `build` method.
* Custom scoreboards created using this builder pattern can enhance gameplay by providing players with relevant information or game statistics during gameplay.
