2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2026-05-03 11:40:29 +00:00

ignore IllegalStateException thrown by ServerConnection class in velocity

This commit is contained in:
2024-05-14 19:23:09 +04:00
parent 71287055b4
commit 19c050e998

View File

@@ -26,7 +26,6 @@ import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.ServerConnection; import com.velocitypowered.api.proxy.ServerConnection;
import com.velocitypowered.api.proxy.server.RegisteredServer; import com.velocitypowered.api.proxy.server.RegisteredServer;
import com.velocitypowered.api.proxy.server.ServerPing; import com.velocitypowered.api.proxy.server.ServerPing;
import net.kyori.adventure.text.Component;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@@ -146,8 +145,11 @@ public class RedisBungeeListener {
return; return;
} }
} }
try {
((ServerConnection) event.getSource()).sendPluginMessage(event.getIdentifier(), out.toByteArray()); // ServerConnection throws IllegalStateException when connection dies somehow so just ignore :/
((ServerConnection) event.getSource()).sendPluginMessage(event.getIdentifier(), out.toByteArray());
} catch (IllegalStateException ignored) {
}
}); });
} }