Releases: Andre601/asl-api
v3.1.0: New getters, setters and 1 deprecation
Added
- New getters in
ProfileEntry
:maxPlayersEnabled()
- Returns the value forplayerCount -> maxPlayers -> enabled
asNullBool
maxPlayersCount()
- Returns the value ofplayerCount -> maxPlayers -> amount
as nullableInteger
- 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 deprecatedsetExtraPlayerCount(Integer)
method.
Deprecated
setExtraPlayerEnabled(Integer)
inProfileEntry.Builder
- Typo in method name.
v3.0.0: Platform specific Server and Proxy instances
This update brings some breaking changes, but also some new additions.
Breaking Changes
- Packages for the different
platform-x
APIs have been renamed fromch.andre601.advancedserverlist.<platform>
toch.andre601.advancedserverlist.api.<platform>
platform-spigot
was removed and instead aplatform-bukkit
API has been made.
Added
GenericServer
now has platform-specific extensions in their respective platform API, providing new getters to useBukkitServer
- Available onplatform-bukkit
. Provides agetWorlds()
method that returns aMap<String, World>
of all loaded worlds.BungeeProxy
- Available onplatform-bungeecord
. Provides agetServer()
method that returns aMap<String, ServerInfo>
of all registered Servers on the proxy.VelocityProxy
- Available onplatform-velocity
. Provides agetServer()
method that returns aMap<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
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 nowmotd()
getPlayerCountText()
is nowplayerCountText()
- 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
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
Update README.md
v1.0.0: First release
This is the first official release of the AdvancedServerList API.