Skip to content

Sidebar

A module for creating multi-platform scoreboards and sidebars.

Features

  • Sidebars
  • Scoreboards (sidebar for showing score)

Usage

Maven

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<repositories>
    <repository>
        <id>screamingrepo</id>
        <url>https://repo.screamingsandals.org/repository/maven-public</url>
    </repository>
    <repository>
        <id>papermc</id>
        <url>https://papermc.io/repo/repository/maven-public</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>org.screamingsandals.lib</groupId>
        <artifactId>sidebar-YOUR_PLATFORM</artifactId>
        <version>2.0.1-SNAPSHOT</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.screamingsandals.lib</groupId>
        <artifactId>annotation</artifactId>
        <version>2.0.1-SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

<!-- Shade plugin configuration and relocation package org.screamingsandals.lib to your own package -->

Gradle

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
repositories {
    maven { 
        url 'https://repo.screamingsandals.org/repository/maven-public'
    }
    maven {
        url 'https://papermc.io/repo/repository/maven-public'
    }
}

dependencies {
    implementation 'org.screamingsandals.lib:sidebar-YOUR_PLATFORM:2.0.1-SNAPSHOT'
    annotationProcessor 'org.screamingsandals.lib:annotation:2.0.1-SNAPSHOT'
}

Examples

Creating a sidebar

A Sidebar extends LinedVisual, DatableVisual and TeamedSidebar so you can use any methods from those.

1
2
3
4
5
6
Sidebar.of()
    .title("Testing sidebar")
    .bottomLine(Component.text("Line 1:"))
    .bottomLine(Component.text("Line 2:"))
    .addViewer(player)
    .show();

Last update: 2022-01-18
Back to top