If Bungeecord ServerConnectEvent is cancelled then ignore the event (#1450)

This commit is contained in:
bundabrg 2019-09-11 20:51:00 +08:00 committed by Myles
parent 3c436c0259
commit c7050565b8
1 changed files with 4 additions and 0 deletions

View File

@ -66,6 +66,10 @@ public class BungeeServerHandler implements Listener {
// Set the handshake version every time someone connects to any server
@EventHandler
public void onServerConnect(ServerConnectEvent e) {
if (e.isCancelled()) {
return;
}
UserConnection user = Via.getManager().getConnection(e.getPlayer().getUniqueId());
if (user == null) return;
if (!user.has(BungeeStorage.class)) {