Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Bump version to 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre601 committed Feb 1, 2023
1 parent 2a7b2f5 commit cacacb5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
24 changes: 10 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ dependencies {
// Optional platform-specific dependencies. Read more below
implementation 'ch.andre601.asl-api:platform-bungeecord:{version}'
implementation 'ch.andre601.asl-api:platform-paper:{version}'
implementation 'ch.andre601.asl-api:platform-spigot:{version}'
implementation 'ch.andre601.asl-api:platform-velocity:{version}'
}
Expand Down Expand Up @@ -47,11 +46,6 @@ dependencies {
<artifactId>platform-bungeecord</artifactId>
<version>{version}</version>
</dependency>
<dependency>
<groupId>ch.andre601.asl-api</groupId>
<artifactId>platform-paper</artifactId>
<version>{version}</version>
</dependency>
<dependency>
<groupId>ch.andre601.asl-api</groupId>
<artifactId>platform-spigot</artifactId>
Expand All @@ -69,8 +63,7 @@ dependencies {

This API repo provides additional platform-specific dependencies to use for specific versions of AdvancedServerList.

The main purpose is to provide a way for you to cast the GenericPlayer to a platform-specific variant for extra options (if available).
These dependencies are optional and not needed unless you directly want to get platform specific data (i.e. OfflinePlayer instance on Spigot/Paper).
These platform-specific APIs not only allow to cast the `GenericPlayer` to more platform-specific ones for more options (i.e. `SpigotPlayer` and its `getPlayer()` method), but also provide the [`PreServerListSetEvent`](#events) to hook into and use.

## Using the API

Expand Down Expand Up @@ -128,11 +121,14 @@ To make AdvancedServerList actually handle your placeholders will you need to ca
api.addPlaceholderProvider(new MyPlaceholders());
```

Please note, that your PlaceholderProvider instance will only be accepted when it meets the following criterias:
Please note, that your PlaceholderProvider instance will only be accepted when it meets the following criteria:

1. A non-null PlaceholderProvider instance was given.
2. A non-null, non-empty identifier has been provided
3. The identifier does not contain any spaces
4. Another PlaceholderProvider with the same identifier isn't already added.

1. A non-null, non-empty identifier has been provided
2. The identifier does not contain any spaces
3. Another PlaceholderProvider with the same identifier isn't already added.
Failing any of the above checks will not add your class as a PlaceholderProvider to the API.

### Events

Expand All @@ -141,9 +137,9 @@ It allows you to modify the ProfileEntry used for the player pinging the server/

### ProfileEntry

The ProfileEntry class has been moved to the API in v1.1.0 allowing you to create your own versions using the available Builder class.
The ProfileEntry class has been moved to the API in v2, allowing you to create your own versions using the available Builder class.

The ProfileEntry is what contains the necessary data from the server list profiles. This can be an entry from the "profiles" list, the settings themselves in the file or a mix of both depending on what options are present.
The ProfileEntry is what contains the necessary data from the server list profiles. The values can be from a `profiles` list entry, the global option in the file, or both depending on what is and is not present.
You can create a new entry or copy an existing one (i.e. from the [`PreServerListSetEvent`](#events)) to modify and use in the server list by setting it in the aforementioned `PreServerListSetEvent`.

## Support
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<api.version>1.0.0</api.version>
<api.version>2.0.0</api.version>
</properties>

<modules>
Expand Down

0 comments on commit cacacb5

Please sign in to comment.