rename
This commit is contained in:
@@ -4,6 +4,7 @@ import cc.maxmc.msm.common.event.ChannelActiveEvent
|
||||
import cc.maxmc.msm.common.event.ChannelInactiveEvent
|
||||
import cc.maxmc.msm.common.event.PacketReceiveEvent
|
||||
import cc.maxmc.msm.common.utils.awaiting
|
||||
import cc.maxmc.msm.common.utils.log
|
||||
import io.netty.channel.ChannelHandler.Sharable
|
||||
import io.netty.channel.ChannelHandlerContext
|
||||
import io.netty.channel.SimpleChannelInboundHandler
|
||||
@@ -12,9 +13,7 @@ import kotlin.coroutines.resume
|
||||
@Sharable
|
||||
object ClusterPacketHandler : SimpleChannelInboundHandler<BungeePacket>() {
|
||||
override fun channelRead0(ctx: ChannelHandlerContext, msg: BungeePacket) {
|
||||
awaiting.filter { it.first == msg::class.java }
|
||||
.filter { it.second(ctx.channel(), msg) }
|
||||
.forEach {
|
||||
awaiting.filter { it.first == msg::class.java }.filter { it.second(ctx.channel(), msg) }.forEach {
|
||||
it.third.resume(msg)
|
||||
}
|
||||
PacketReceiveEvent(ctx.channel(), msg).callEvent()
|
||||
|
||||
Reference in New Issue
Block a user