File tree Expand file tree Collapse file tree
src/main/kotlin/com/viaversion/aas/handler/state Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,10 +57,18 @@ class LoginState : ConnectionState {
5757 is SetCompression -> handleCompression(handler, packet)
5858 is LoginAck -> handleLoginAck(handler, packet)
5959 is UnknownPacket -> throw StacklessException (" unknown packet ${packet.id} " )
60+ is PluginRequest -> handlePluginRequest(handler, packet)
6061 else -> forward(handler, packet)
6162 }
6263 }
6364
65+ private fun handlePluginRequest (handler : MinecraftHandler , packet : PluginRequest ) {
66+ if (packet.channel == " oam:join" ) {
67+ throw StacklessException (" VIAaaS connection loop detected" )
68+ }
69+ forward(handler, packet)
70+ }
71+
6472 private fun handleLoginAck (handler : MinecraftHandler , packet : LoginAck ) {
6573 handler.data.setBothStates(ConfigurationState ())
6674 forward(handler, packet)
You can’t perform that action at this time.
0 commit comments