This repository has been archived by the owner on Jul 23, 2020. It is now read-only.
Change Notes
-
Breaking Changes
- Changed the constant names in the
LavaClient
class so that they match the others. - Removed the
init
properties from the configuration-via-source method, they're in theglobal
section now. - Removed the deprecated constructors that accepted
overrideJson
as a parameter. - Made
destroyPlayer
not actually remove the player from the cache -- this is up to the user now. - Removed dependencies on Sentry Logback -- SLF4J API is used now, so any logger compatible with that can be used. Sentry Logback and Logback in general are compatible with SLF4J API.
- Changed the behaviour of
getBestNode
yet again -- not too important for users (returnsnull
if not found, returns the node if it's found even if it's not available).
- Changed the constant names in the
-
Non-breaking Changes/Features
- Deprecated the constructors that accepted basic cache settings. You should use the setters now.
- Added complete support for safe reconnections, meaning you can change a node/reboot it even when your bot is running without things blowing up. You can also close and open the connection to the socket manually with callbacks provided that get reset after 2 seconds of not being used to prevent old callbacks being used.
- You can completely configure the reconnection process -- the default "base" value, the maximum value, the unit to wait in and how the value expands (like 2 -> 4 -> 8 for example).
- You can now specify your own
WebSocketFactory
so, combined with theSocketInitializer
class, you can configure basically every aspect of LavaClient's connection to your nodes.
-
v3.0.1
fixes a bug where LavaClient did not automatically cap reconnect intervals, and also bases the expander off of the amount of reconnect attempts not the reconnect interval :/ -
v3.0.2
fixes placeholder bugs not being applied in certain cases and also handles intervals better. -
v3.0.3
fixes a small bug where, upon shutdown, LavaClient attempts to close connections to nodes even if a connection isn't open.
Adding LavaClient
You can add LavaClient either through JCenter or by using the binaries attached to this release.
The latest version is presented on this badge:
With Gradle, you can add LavaClient v3.0.3 through JCenter with the following code:
repositories {
jcenter()
}
dependencies {
compile 'com.github.samophis:LavaClient:3.0.3'
}