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

Releases: Andre601/asl-api

v3.1.0: New getters, setters and 1 deprecation

19 Sep 18:47
873d949
Compare
Choose a tag to compare

Added

  • New getters in ProfileEntry:
    • maxPlayersEnabled() - Returns the value for playerCount -> maxPlayers -> enabled as NullBool
    • maxPlayersCount() - Returns the value of playerCount -> maxPlayers -> amount as nullable Integer
  • New setters in ProfileEntry.Builder:
    • setMaxPlayersEnabled(NullBool) - Sets whether the max players feature is enabled or not.
    • setMaxPlayersCount(Integer) - Sets the number to use for the max players count.
    • setExtraPlayersCount(Integer) - Replacement for deprecated setExtraPlayerCount(Integer) method.

Deprecated

  • setExtraPlayerEnabled(Integer) in ProfileEntry.Builder - Typo in method name.

v3.0.0: Platform specific Server and Proxy instances

11 Jun 18:48
4a3ec93
Compare
Choose a tag to compare

This update brings some breaking changes, but also some new additions.

Breaking Changes

  • Packages for the different platform-x APIs have been renamed from ch.andre601.advancedserverlist.<platform> to ch.andre601.advancedserverlist.api.<platform>
  • platform-spigot was removed and instead a platform-bukkit API has been made.

Added

  • GenericServer now has platform-specific extensions in their respective platform API, providing new getters to use
    • BukkitServer - Available on platform-bukkit. Provides a getWorlds() method that returns a Map<String, World> of all loaded worlds.
    • BungeeProxy - Available on platform-bungeecord. Provides a getServer() method that returns a Map<String, ServerInfo> of all registered Servers on the proxy.
    • VelocityProxy - Available on platform-velocity. Provides a getServer() method that returns a Map<String, RegisteredServer> of all registered Servers on the proxy.

Removed

  • All deprecated methods in the ProfileEntry class have been removed.

v2.1.0: Changed ProfileEntry to a Record

29 Mar 16:28
cbf52b6
Compare
Choose a tag to compare

The ProfileEntry class has been turned into a record. This brings one important change, which is that the old getX methods have been replaced with their new x methods.

As an example:

  • getMotd() is now motd()
  • getPlayerCountText() is now playerCountText()
  • etc.

To keep backwards compatability are the old getters still available, but deprecated and planned for removal in a future minor or major version (patch updates won't have them removed)

v2.0.0: Custom event support

01 Feb 14:10
Compare
Choose a tag to compare

Added PreServerListSetEvent

This event is accessible through one of the platform APIs and is called before AdvancedServerList tries to alter the Server list.
It can be used to override the used ProfileEntry (Read more below) or even cancel the event resulting in no changes being made.

Added ProfileEntry

The ProfileEntry has been moved from the core module to the API. It is used to hold the different settings configured in a server list profile. You can make your own using the nested Builder class, create a Builder instance from an existing entry by using getBuilder() or just make a copy of a ProfileEntry using copy()

Added NullBool

The NullBool enum is used to set a boolean option in the ProfileEntry. It can be either TRUE, FALSE or NOT_SET if the retrieved value is not present or null.

It also has a method getOrDefault(boolean def) that returns the boolean value associated with the state used, or def if NOT_SET is used.

Changed classes to interfaces

Some classes have been changed to interfaces to make them a bit more clean.

Affected classes are:

  • GenericPlayer (api)
  • GenericServer (api)
  • BungeePlayer (platform-bungee)
  • SpigotPlayer (platform-spigot)
  • VelocityPlayer (platform-velocity)

[BREAKING] Removed modules

The core module has been removed alongside the platfrom-paper one. Later one was removed since it didn't have any Paper specific features and was therefore not useful and only duplicated code.

[BREAKING] Moved GenericPlayer methods

The GenericPlayer interface now only has getName(), getProtocol() and getUUID() present. The other methods have been moved to their respective, platform-specific player instance:

  • SpigotPlayer
    • hasPlayedBefore()
    • isBanned()
    • isWhitelisted()
  • VelocityPlayer
    • getVersion()

v1.0.0-b1: First test release

23 Jan 19:07
d5cbcc6
Compare
Choose a tag to compare

v1.0.0: First release

24 Jan 12:15
d5cbcc6
Compare
Choose a tag to compare

This is the first official release of the AdvancedServerList API.