Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-25 07:40:08 +01:00
If Bungeecord ServerConnectEvent is cancelled then ignore the event (#1450)
Dieser Commit ist enthalten in:
Ursprung
3c436c0259
Commit
c7050565b8
@ -66,6 +66,10 @@ public class BungeeServerHandler implements Listener {
|
|||||||
// Set the handshake version every time someone connects to any server
|
// Set the handshake version every time someone connects to any server
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onServerConnect(ServerConnectEvent e) {
|
public void onServerConnect(ServerConnectEvent e) {
|
||||||
|
if (e.isCancelled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
UserConnection user = Via.getManager().getConnection(e.getPlayer().getUniqueId());
|
UserConnection user = Via.getManager().getConnection(e.getPlayer().getUniqueId());
|
||||||
if (user == null) return;
|
if (user == null) return;
|
||||||
if (!user.has(BungeeStorage.class)) {
|
if (!user.has(BungeeStorage.class)) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren