fix player chat fort error
This commit is contained in:
@ -3,10 +3,9 @@ package basic
|
|||||||
import (
|
import (
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/Tnze/go-mc/registry"
|
|
||||||
|
|
||||||
"github.com/Tnze/go-mc/data/packetid"
|
"github.com/Tnze/go-mc/data/packetid"
|
||||||
pk "github.com/Tnze/go-mc/net/packet"
|
pk "github.com/Tnze/go-mc/net/packet"
|
||||||
|
"github.com/Tnze/go-mc/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
// WorldInfo content player info in server.
|
// WorldInfo content player info in server.
|
||||||
|
@ -10,15 +10,15 @@ type Decoration struct {
|
|||||||
TranslationKey string `nbt:"translation_key"`
|
TranslationKey string `nbt:"translation_key"`
|
||||||
Parameters []string `nbt:"parameters"`
|
Parameters []string `nbt:"parameters"`
|
||||||
Style struct {
|
Style struct {
|
||||||
Bold bool `nbt:"bold"`
|
Bold bool `nbt:"bold,omitempty"`
|
||||||
Italic bool `nbt:"italic"`
|
Italic bool `nbt:"italic,omitempty"`
|
||||||
UnderLined bool `nbt:"underlined"`
|
UnderLined bool `nbt:"underlined,omitempty"`
|
||||||
StrikeThrough bool `nbt:"strikethrough"`
|
StrikeThrough bool `nbt:"strikethrough,omitempty"`
|
||||||
Obfuscated bool `nbt:"obfuscated"`
|
Obfuscated bool `nbt:"obfuscated,omitempty"`
|
||||||
Color string `nbt:"color"`
|
Color string `nbt:"color,omitempty"`
|
||||||
Insertion string `nbt:"insertion"`
|
Insertion string `nbt:"insertion,omitempty"`
|
||||||
Font string `nbt:"font"`
|
Font string `nbt:"font,omitempty"`
|
||||||
} `nbt:"style"`
|
} `nbt:"style,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Type struct {
|
type Type struct {
|
||||||
|
@ -22,7 +22,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
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")
|
name = flag.String("name", "Daze", "The player's name")
|
||||||
playerID = flag.String("uuid", "", "The player's UUID")
|
playerID = flag.String("uuid", "", "The player's UUID")
|
||||||
accessToken = flag.String("token", "", "AccessToken")
|
accessToken = flag.String("token", "", "AccessToken")
|
||||||
|
@ -83,7 +83,7 @@ func (s *scanner) eof() int {
|
|||||||
return scanEnd
|
return scanEnd
|
||||||
}
|
}
|
||||||
if s.errContext == "" {
|
if s.errContext == "" {
|
||||||
s.errContext = "unexpected end of JSON input"
|
s.errContext = "unexpected end of SNBT input"
|
||||||
}
|
}
|
||||||
return scanError
|
return scanError
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user