support multi handler for same packetID and handler priority.
This commit is contained in:
@ -1,10 +1,11 @@
|
||||
package bot
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/Tnze/go-mc/data/packetid"
|
||||
"github.com/Tnze/go-mc/net"
|
||||
"github.com/Tnze/go-mc/yggdrasil/user"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
// Client is used to access Minecraft server
|
||||
@ -34,7 +35,7 @@ func (c *Client) Close() error {
|
||||
func NewClient() *Client {
|
||||
return &Client{
|
||||
Auth: Auth{Name: "Steve"},
|
||||
Events: Events{handlers: make(map[packetid.ClientboundPacketID]*handlerHeap)},
|
||||
Events: Events{handlers: make([][]PacketHandler, packetid.ClientboundPacketIDGuard)},
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user