This commit backports the event manager from Velocity Polymer, with some changes for Velocity 1.1.x API compatibility:
- All event handlers run asynchronously. (While EventTask.async() exists, it is not useful in 3.0.0, but is provided as a migration aid for Polymer.)
- Event ordering is currently limited to the 5 levels available in Velocity 1.x.x.
This commit simplifies the Metrics class by using the new base module
from bStats. It also migrates to the new bStats config file that will
be used by plugins that integrate bStats. If a user disabled bStats in
the old config file, this setting will be copied to the new config file.
We have dropped the rarely used kqueue and replaced it with the new Netty aarch64
native. In addition, lay down the foundation for other aarch64 natives.
By default, ping pass-through is not enabled. However, you can use
ping passthrough to pass through just mods (great for modded servers)
or everything.
The most significant advantage is that Velocity gets a well-tested
HTTP client implementation which also includes a connection pool,
allowing us to avoid the overhead of TCP and TLS handshakes upon each
login.
Unfortunately, Async HTTP Client does not work with the kqueue transport.
Since almost nobody runs a production Velocity server on macOS, we have
decided to remove kqueue support. The benefits that Async HTTP Client
provides outweigh the disadvantages of not having a macOS native transport.
macOS is adequately supported by the normal NIO transport.
Add log4j.skipJansi to prevent Log4j from initializing a Jansi
terminal. It is redundant because this is handled by TCA and it
will be only active for a few seconds until TCA is loaded.
* Delay switch to new server until after JoinGame is sent.
Unfortunately, in some cases (especially vanilla Minecraft) some login
disconnects are sent after ServerLoginSuccess but before JoinGame.
We've been using ServerLoginSuccess but it has caused too many problems.
Now Velocity will switch to a stripped-down version of the play session
handler until JoinGame is received. This handler does very little by
itself: it simply forwards plugin messages (for Forge) and waits for the
JoinGame packet from the server.
This is an initial version: only vanilla Minecraft 1.12.2 was tested.
However this is the way Waterfall without entity rewriting does server
switches (which, in turn, is inherited from BungeeCord).
* Move to Gradle 5 and Error Prone.
Updating Checker Framework flagged numerous warnings, which have been
corrected. These probably involve type declarations lacking a nullness
annotation that appeared elsewhere.