* Only double switch if the dimension is the same.
According to the protocol, a double respawn packet is only needed to be
sent if from the same dimension, so by storing the last known dimension,
we are able to compare and avoid the double packet.
This also maintains the same behaviour for Spigot
ad2f806097
* Store current dimension on first disconnect too
According to the protocol, a double respawn packet is only needed to be
sent if from the same dimension, so by storing the last known dimension,
we are able to compare and avoid the double packet.
This also maintains the same behaviour for Spigot
ad2f806097
If the client protocol version is not supported, show outdated_server message only if client version is higher than highest supported protocol version, outdated_client message else.
If the list would look like this
- test1 -> 1.8 -> ServerKickEvent cancelled -> reason set to "outdated"
- test2 -> 1.8
- test3 -> 1.9
and a player joins with version 1.8 he would never be connected to test2 because the server test2 is not equal to test1 and the server test3 is not equal to test1.
So test3 is the last in the while loop and would be used also if another server with higher priority matches the requirements.
Action Bar packets in 1.9 now correctly support the JSON format, however sending them the 1.8 way will kick the client. This keeps the compatibility with 1.8 clients with the version check whilst correctly sending the packet to 1.9 clients.
This commit adds a config switch that allows users to turn off
the logging of proxy commands. It is set to off by default to
prevent unwanted log spam and keep current behaviour.
Log proxy commands
This commit changes the PluginManager to print a message to
console and the log when a proxy command is executed.
This may assist with debugging and miscellaneous
investigations.
* Only check the version of FML if we are running Minecraft 1.7.10 - 1.8 clients are always valid.
* If the version of FML that is reported is 7.10.99.99 - report the Forge version instead.
This method is simple: it resets the current part to default settings, keeping only the current text. It therefore acts like the old ChatColor.RESET
code. The retain method allows for more control over what is reset.
Add a test to verify proper functioning of reset()/retain().
The previous native cipher code has been refactored so that it may be loaded and used slightly more generically, allowing more native components to be easily added as time goes on.
I have also written a new native code compression module, which wraps around zlib in the same manner that Inflater / Deflater does, however it operates directly on the memory addresses of it's input / output buffers which means that we can save one, or maybe even two copies. To support this, the VarInt decoder has been adjusted to always use a native buffer.
For Minecraft+Forge 1.8 we can detect whether the user is a Forge user before we get the mod list, due to the changes to the initial (not FML|HS) handshake that are now made (which is for vanilla client support). Bungee can exploit this to detect FML clients from the off, but it still does not tell us what the mod list is. Thus, creating this API method for users who simply need to know whether the user is connected via FML is no longer a duplication of the getModList api method.
For Forge 1.8, a new \0FML\0 token is included in the handshake packet host field. Whilst from a Forge <-> Bungee standpoint, this is good in the long run (we can detect Forge/FML clients right from the off, allowing us to expose a reliable API for detecting modded 1.8+ clients), it plays havoc with IP forwarding on Spigot servers, as they expect a very specific format.
Until we can look at improving this situation (probably by creating an updated IP forwarding protocol on the server side), this removes the FML marker from the handshake whenever IP forwarding is on. If you have a FML 1.8 network, IP forwarding MUST be off.
With thanks to @geNAZt for finding the issue.