Skip to content

Commit a30694b

Browse files
committed
chore: Remove redundant type conversion
1 parent ede4373 commit a30694b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

service/minecraft/handler.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ func NewConnHandler(s *config.ConfigProxyService,
196196
if options.McNameMode != access.DefaultMode {
197197
hit := false
198198
for _, list := range s.Minecraft.NameAccess.ListTags {
199-
if hit = common.Must(access.GetTargetList(list)).Has(string(playerName)); hit {
199+
if hit = common.Must(access.GetTargetList(list)).Has(playerName); hit {
200200
break
201201
}
202202
}
@@ -216,7 +216,7 @@ func NewConnHandler(s *config.ConfigProxyService,
216216
}
217217
}
218218
log.Printf("Service %s : %s New Minecraft player logged in: %s [%s]", s.Name, ctx.ColoredID, playerName, accessibility)
219-
ctx.AttachInfo("PlayerName=" + string(playerName))
219+
ctx.AttachInfo("PlayerName=" + playerName)
220220
if accessibility == "DENY" || accessibility == "REJECT" {
221221
msg, err := generateKickMessage(s, playerName).MarshalJSON()
222222
if err != nil {
@@ -259,7 +259,7 @@ func NewConnHandler(s *config.ConfigProxyService,
259259
protocol,
260260
func() string {
261261
if !s.Minecraft.IgnoreFMLSuffix &&
262-
strings.HasSuffix(string(hostname), "\x00FML\x00") {
262+
strings.HasSuffix(hostname, "\x00FML\x00") {
263263
return s.Minecraft.RewrittenHostname + "\x00FML\x00"
264264
}
265265
return s.Minecraft.RewrittenHostname

0 commit comments

Comments
 (0)