Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 17:10:13 +01:00
Fix late Bungee connection cancelling
Dieser Commit ist enthalten in:
Ursprung
26de3fe573
Commit
3ba2191829
@ -64,7 +64,7 @@ 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(priority = 120)
|
||||||
public void onServerConnect(ServerConnectEvent e) {
|
public void onServerConnect(ServerConnectEvent e) {
|
||||||
if (e.isCancelled()) {
|
if (e.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
@ -89,7 +89,7 @@ public class BungeeServerHandler implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = -120)
|
||||||
public void onServerConnected(ServerConnectedEvent e) {
|
public void onServerConnected(ServerConnectedEvent e) {
|
||||||
try {
|
try {
|
||||||
checkServerChange(e, Via.getManager().getConnection(e.getPlayer().getUniqueId()));
|
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) {
|
public void onServerSwitch(ServerSwitchEvent e) {
|
||||||
// Update entity id
|
// Update entity id
|
||||||
UserConnection userConnection = Via.getManager().getConnection(e.getPlayer().getUniqueId());
|
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 {
|
public void checkServerChange(ServerConnectedEvent e, UserConnection user) throws Exception {
|
||||||
if (user == null) return;
|
if (user == null) return;
|
||||||
// Auto-team handling
|
// Auto-team handling
|
||||||
|
@ -189,7 +189,9 @@ public class Protocol1_16To1_15_2 extends Protocol<ClientboundPackets1_15, Clien
|
|||||||
handler(wrapper -> {
|
handler(wrapper -> {
|
||||||
String channel = wrapper.passthrough(Type.STRING);
|
String channel = wrapper.passthrough(Type.STRING);
|
||||||
if (channel.length() > 32) {
|
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();
|
wrapper.cancel();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren