fix player chat fort error

This commit is contained in:
Tnze
2022-12-04 16:08:52 +08:00
parent 089d12e36b
commit ff94c600df
4 changed files with 12 additions and 13 deletions

View File

@ -3,10 +3,9 @@ package basic
import (
"unsafe"
"github.com/Tnze/go-mc/registry"
"github.com/Tnze/go-mc/data/packetid"
pk "github.com/Tnze/go-mc/net/packet"
"github.com/Tnze/go-mc/registry"
)
// WorldInfo content player info in server.

View File

@ -10,15 +10,15 @@ type Decoration struct {
TranslationKey string `nbt:"translation_key"`
Parameters []string `nbt:"parameters"`
Style struct {
Bold bool `nbt:"bold"`
Italic bool `nbt:"italic"`
UnderLined bool `nbt:"underlined"`
StrikeThrough bool `nbt:"strikethrough"`
Obfuscated bool `nbt:"obfuscated"`
Color string `nbt:"color"`
Insertion string `nbt:"insertion"`
Font string `nbt:"font"`
} `nbt:"style"`
Bold bool `nbt:"bold,omitempty"`
Italic bool `nbt:"italic,omitempty"`
UnderLined bool `nbt:"underlined,omitempty"`
StrikeThrough bool `nbt:"strikethrough,omitempty"`
Obfuscated bool `nbt:"obfuscated,omitempty"`
Color string `nbt:"color,omitempty"`
Insertion string `nbt:"insertion,omitempty"`
Font string `nbt:"font,omitempty"`
} `nbt:"style,omitempty"`
}
type Type struct {

View File

@ -22,7 +22,7 @@ import (
)
var (
address = flag.String("address", "127.0.0.1:25566", "The server address")
address = flag.String("address", "127.0.0.1:25565", "The server address")
name = flag.String("name", "Daze", "The player's name")
playerID = flag.String("uuid", "", "The player's UUID")
accessToken = flag.String("token", "", "AccessToken")

View File

@ -83,7 +83,7 @@ func (s *scanner) eof() int {
return scanEnd
}
if s.errContext == "" {
s.errContext = "unexpected end of JSON input"
s.errContext = "unexpected end of SNBT input"
}
return scanError
}