Skip to content

Commit b0be851

Browse files
committed
refactor: remove unused test entity command from built-in commands
- Deleted the newTestEntityCmd function and its registration in the built-in commands. - Streamlined the command registration process by eliminating unnecessary code. This change helps maintain cleaner code and reduces potential confusion regarding unused commands.
1 parent d7779f6 commit b0be851

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

pkg/edition/java/proxy/builtin_commands.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,14 @@ package proxy
22

33
import (
44
"go.minekube.com/brigodier"
5-
. "go.minekube.com/common/minecraft/component"
65
"go.minekube.com/gate/pkg/command"
7-
"go.minekube.com/gate/pkg/edition/java/proto/packet/brigadier"
86
)
97

108
func (p *Proxy) registerBuiltinCommands() []string {
119
return []string{
1210
p.command.Register(newServerCmd(p)).Name(),
1311
p.command.Register(newGlistCmd(p)).Name(),
1412
p.command.Register(newSendCmd(p)).Name(),
15-
p.command.Register(newTestEntityCmd(p)).Name(),
1613
}
1714
}
1815

@@ -21,14 +18,3 @@ func hasCmdPerm(proxy *Proxy, perm string) brigodier.RequireFn {
2118
return !proxy.cfg.RequireBuiltinCommandPermissions || c.Source.HasPermission(perm)
2219
})
2320
}
24-
25-
func newTestEntityCmd(proxy *Proxy) brigodier.LiteralNodeBuilder {
26-
return brigodier.Literal("testentity").
27-
Then(brigodier.Argument("player", brigadier.PlayerArgument).
28-
Executes(command.Command(func(c *command.Context) error {
29-
playerName := c.String("player")
30-
return c.SendMessage(&Text{
31-
Content: "EntityArgumentType: You specified player '" + playerName + "' - this uses proper minecraft:entity argument type!",
32-
})
33-
})))
34-
}

0 commit comments

Comments
 (0)