3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 08:30:09 +01:00

Fix late Bungee connection cancelling

Dieser Commit ist enthalten in:
KennyTV 2020-06-30 13:51:06 +02:00
Ursprung 26de3fe573
Commit 3ba2191829
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
2 geänderte Dateien mit 6 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -64,7 +64,7 @@ public class BungeeServerHandler implements Listener {
}
// Set the handshake version every time someone connects to any server
@EventHandler
@EventHandler(priority = 120)
public void onServerConnect(ServerConnectEvent e) {
if (e.isCancelled()) {
return;
@ -89,7 +89,7 @@ public class BungeeServerHandler implements Listener {
}
}
@EventHandler(priority = EventPriority.LOWEST)
@EventHandler(priority = -120)
public void onServerConnected(ServerConnectedEvent e) {
try {
checkServerChange(e, Via.getManager().getConnection(e.getPlayer().getUniqueId()));
@ -98,7 +98,7 @@ public class BungeeServerHandler implements Listener {
}
}
@EventHandler(priority = EventPriority.LOWEST)
@EventHandler(priority = -120)
public void onServerSwitch(ServerSwitchEvent e) {
// Update entity id
UserConnection userConnection = Via.getManager().getConnection(e.getPlayer().getUniqueId());
@ -116,7 +116,6 @@ public class BungeeServerHandler implements Listener {
}
}
public void checkServerChange(ServerConnectedEvent e, UserConnection user) throws Exception {
if (user == null) return;
// Auto-team handling

Datei anzeigen

@ -189,7 +189,9 @@ public class Protocol1_16To1_15_2 extends Protocol<ClientboundPackets1_15, Clien
handler(wrapper -> {
String channel = wrapper.passthrough(Type.STRING);
if (channel.length() > 32) {
Via.getPlatform().getLogger().warning("Ignoring incoming plugin channel, as it is longer than 32 characters: " + channel);
if (!Via.getConfig().isSuppressConversionWarnings()) {
Via.getPlatform().getLogger().warning("Ignoring incoming plugin channel, as it is longer than 32 characters: " + channel);
}
wrapper.cancel();
}
});