# Scoreboard Builder

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://glitchtechs.gitbook.io/galaxy/starapi-spigot-paper/builders/scoreboard-builder.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
