Add playerinfo recorder for chat message

This commit is contained in:
Tnze
2022-12-30 01:09:08 +08:00
parent 6fba193255
commit 77857a1a85
6 changed files with 206 additions and 39 deletions

View File

@ -8,7 +8,6 @@ import (
"github.com/Tnze/go-mc/bot"
"github.com/Tnze/go-mc/bot/basic"
"github.com/Tnze/go-mc/bot/msg"
"github.com/Tnze/go-mc/chat"
_ "github.com/Tnze/go-mc/data/lang/en-us"
"github.com/Tnze/go-mc/data/packetid"
@ -18,9 +17,8 @@ import (
const timeout = 45
var (
c *bot.Client
p *basic.Player
bc *msg.Manager
c *bot.Client
p *basic.Player
watch chan time.Time
)
@ -34,7 +32,6 @@ func main() {
Disconnect: onDisconnect,
Death: onDeath,
})
bc = msg.New(c, p, msg.EventsHandler{PlayerChatMessage: onChatMsg})
// Register event handlers