1
0
Fork
You've already forked asl-api
0
Source of AdvancedServerList's API
Java 100%
Find a file
Andre601 548744f6c5
All checks were successful
ci/woodpecker/push/update_docs Pipeline was successful
Update example of PlaceholderProvider.
2025年06月23日 01:45:02 +02:00
.gitea/ISSUE_TEMPLATE Fix unknown type because uppercase D, lol 2024年04月17日 22:53:47 +02:00
.mvn Use local Maven settings file 2024年03月01日 16:57:59 +01:00
.woodpecker Use from_secret ENV instead of deprecated secrets option 2025年01月05日 16:31:47 +00:00
api Update example of PlaceholderProvider. 2025年06月23日 01:45:02 +02:00
platform-bukkit Revert "Add FaviconResizeMode for new feature" 2025年06月21日 12:35:59 +02:00
platform-bungeecord Revert "Add FaviconResizeMode for new feature" 2025年06月21日 12:35:59 +02:00
platform-velocity Revert "Add FaviconResizeMode for new feature" 2025年06月21日 12:35:59 +02:00
src/main/javadoc Add option to hide Player Hover 2025年01月05日 17:12:56 +01:00
.gitignore Add README.md, LICENSE and .gitignore 2023年01月23日 14:29:14 +01:00
domains Bump to 3.2.0 and add methods to publish Javadoc 2024年02月28日 20:58:52 +01:00
LICENSE Add README.md, LICENSE and .gitignore 2023年01月23日 14:29:14 +01:00
pom.xml Revert "Add FaviconResizeMode for new feature" 2025年06月21日 12:35:59 +02:00
README.md Update README 2024年10月04日 22:38:37 +00:00
SECURITY.md Add SECURITY.md 2024年10月04日 22:21:38 +00:00

AdvancedServerList API

The AdvancedServerList API is used to interact with the plugin AdvancedServerList, allowing you to do things such as modifying different aspects of the displayed Server List.

Table of Contents

Security

Please see the SECURITY.md file for currently supported versions of this API.

Install

Detailed instructions on how to install and use this API are found here.

Below is a basic example of integrating it into your pom.xml or build.gradle (Replace {version} with the latest available one).

Maven

<repositories>
 <repository>
 <id>codeberg</id>
 <url>https://codeberg.org/api/packages/Andre601/maven/</url>
 </repository>
</repositories>
<dependencies>
 <dependency>
 <groupId>ch.andre601.asl-api</groupId>
 <artifactId>api</artifactId>
 <version>{version}</version>
 <scope>provided</scope>
 </dependency>
 <!-- Optional Dependencies -->
 <dependency>
 <groupId>ch.andre601.asl-api</groupId>
 <artifactId>platform-bukkit</artifactId>
 <version>{version}</version>
 <scope>provided</scope>
 </dependency>
 <dependency>
 <groupId>ch.andre601.asl-api</groupId>
 <artifactId>platform-bungeecord</artifactId>
 <version>{version}</version>
 <scope>provided</scope>
 </dependency>
 <dependency>
 <groupId>ch.andre601.asl-api</groupId>
 <artifactId>platform-velocity</artifactId>
 <version>{version}</version>
 <scope>provided</scope>
 </dependency>
</dependencies>

Gradle

repositories {
 maven { url = "https://codeberg.org/api/packages/Andre601/maven" }
}
dependencies {
 compileOnly "ch.andre601.asl-api:api:{version}"
 // Optional Dependencies
 compileOnly "ch.andre601.asl-api:platform-bukkit:{version}"
 compileOnly "ch.andre601.asl-api:platform-bungeecord:{version}"
 compileOnly "ch.andre601.asl-api:platform-velocity:{version}"
}

Usage

Using the API is explained in the main Wiki.

Below is a basic example of creating your own PlaceholderProvider and registering it.

PlaceholderProvider Example

publicclass ExamplePlaceholderextendsPlaceholderProvider{publicExamplePlaceholder(){super("example")}@OverridepublicStringparsePlaceholder(Stringtext,GenericPlayerplayer,GenericServerserver){if(text.equalsIgnoreCase("hello")){return"world!";}returnnull;}}

Registering PlaceholderProvider

Note

The example below uses a Bukkit-plugin Setup as example.

publicclass MyPluginextendsJavaPlugin{@OverridepublicvoidonEnable(){if(Bukkit.getPluginManager().isPluginEnabled("AdvancedServerList")){AdvancedServerListAPI.get().addPlaceholderProvider(newExamplePlaceholder());}}}

License

AdvancedServerList API is licensed under MIT. See the LICENSE file for the full License text.

Support

discord revolt github