Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/redstone-overhaul' into redstone…
Browse files Browse the repository at this point in the history
…-overhaul
  • Loading branch information
xNatsuri committed Jan 9, 2025
2 parents 6d6f1ee + 22c5e3c commit a00d24f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions server/player/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,16 @@ func (p *Player) ExecuteCommand(commandLine string) {
return
}
args := strings.Split(commandLine, " ")
command, ok := cmd.ByAlias(args[0][1:])

name, ok := strings.CutPrefix(args[0], "/")
if !ok {
return
}

command, ok := cmd.ByAlias(name)
if !ok {
o := &cmd.Output{}
o.Errort(cmd.MessageUnknown, args[0])
o.Errort(cmd.MessageUnknown, name)
p.SendCommandOutput(o)
return
}
Expand Down

0 comments on commit a00d24f

Please sign in to comment.