> ## Documentation Index
> Fetch the complete documentation index at: https://velas.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start: Display Your First VelaBoard Sidebar

> Build a PlayerSidebar and a SharedSidebar with VelaBoard in minutes, starting from the ScoreboardAPI entry point through to show().

VelaBoard's API is built around three core objects: `ScoreboardHandler`, `Scoreboard`, and a sidebar. This page shows you the complete flow to display a sidebar to a player and a shared sidebar visible to multiple players.

## Display a player sidebar

A `PlayerSidebar` is scoped to a single player. Use it for per-player HUDs that show individual data like score or level.

<Steps>
  <Step title="Get the handler">
    Obtain the `ScoreboardHandler` from the API entry point.

    ```java theme={null}
    ScoreboardHandler handler = ScoreboardAPI.getHandler();
    ```
  </Step>

  <Step title="Create a scoreboard">
    Create a `Scoreboard` instance through the handler.

    ```java theme={null}
    Scoreboard board = handler.createScoreboard();
    ```
  </Step>

  <Step title="Register the player">
    Add the player to the scoreboard before creating any sidebars for them.

    ```java theme={null}
    board.addPlayer(player);
    ```
  </Step>

  <Step title="Create the sidebar">
    Create a `PlayerSidebar` with a display title.

    ```java theme={null}
    PlayerSidebar sidebar = board.createPlayerSidebar("§6My Plugin");
    ```
  </Step>

  <Step title="Set lines">
    Populate the sidebar lines. Line `0` is the top line.

    ```java theme={null}
    sidebar.setLine(0, "§7Score: §f100");
    sidebar.setLine(1, "§7Level: §f5");
    ```
  </Step>

  <Step title="Assign and show">
    Assign the sidebar to the player, then call `show()` to display it.

    ```java theme={null}
    sidebar.setPlayer(player);
    sidebar.show();
    ```
  </Step>
</Steps>

## Display a shared sidebar

A `SharedSidebar` shows the same content to multiple players at once. Use it for server-wide information like online player count or a global event status.

```java theme={null}
// Create a shared sidebar with an ID and a display title
SharedSidebar shared = board.createSharedSidebar("server-info", "§bServer Info");

// Set lines
shared.setLine(0, "§7Online: §f" + Bukkit.getOnlinePlayers().size());

// Add a player and show to all registered players
shared.addPlayer(player);
shared.show();
```

To show the sidebar to a specific player by UUID without adding them to the default roster, use `showTo(UUID)`:

```java theme={null}
shared.showTo(player.getUniqueId());
```

<Note>
  Call this code from within a Bukkit event handler such as `PlayerJoinEvent`,
  or at any point after the player is fully online. Calling `addPlayer` or
  `show` before the player has joined will have no effect.
</Note>

<Tip>
  You can use `§` color codes or Adventure API text components in both sidebar
  titles and line content. For dynamic lines that update over time, call
  `setLine` again with new content and re-call `show()` to refresh the display.
</Tip>
