The Bug:
The handleDisconnection() method is called twice when players are forcibly removed from servers (for example, having the "/kick" command used on them) or when they attempt to connect servers that they're not allowed to join (for example, attempting to connect to servers that they're banned from).
The server console states that the handleDisconnection() method is called twice upon reproducing this bug.
For example, when a player uses the "/kick" command on themselves, the following is printed into the server console:
[17:17:17 INFO]: <Avoma> Hello
[17:17:30 INFO]: Avoma lost connection: Kicked by an operator
[17:17:30 INFO]: Avoma left the game
[17:17:30 INFO]: [Avoma: Kicked Avoma: Kicked by an operator]
[17:17:30 WARN]: handleDisconnection() called twice
Steps to Reproduce:
Start a server and ban yourself from it.
Attempt to join the server and look at the server console.
Take note as to whether or not the handleDisconnection() method is called twice when players are forcibly removed from servers or attempt to connect servers that they're not allowed to join.
Observed Behavior:
The handleDisconnection() method is called twice as indicated by the "handleDisconnection() called twice" warning that's logged in the server console.
Expected Behavior:
The handleDisconnection() method would not be called twice.
You can actually reproduce this with the u00a7 mod by typing the § symbol into the chat and pressing enter which will kick you due to an illegal character in chat.