yes222
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package keepalive
|
||||
|
||||
import (
|
||||
"github.com/admin-else/strom/mc/proto"
|
||||
"github.com/admin-else/strom/mc/proto_generated/v1_21_8"
|
||||
)
|
||||
|
||||
type mod struct {
|
||||
*proto.Conn
|
||||
}
|
||||
|
||||
func (m *mod) onKeepAlive(p *v1_21_8.PlayToClientPacketKeepAlive) (err error) {
|
||||
return m.Send(&v1_21_8.PlayToServerPacketKeepAlive{KeepAliveId: p.KeepAliveId})
|
||||
}
|
||||
|
||||
func Start(c *proto.Conn) {
|
||||
m := &mod{Conn: c}
|
||||
m.RegisterUntilLatest(m.onKeepAlive)
|
||||
}
|
||||
Reference in New Issue
Block a user