Skip to content

Commit 5f31df6

Browse files
committed
encapsulates command argument
1 parent 411f209 commit 5f31df6

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

voxels-server/src/main/java/server/commands/commands/TeleportCommand.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import common.world.ChunkData;
77
import common.world.Location;
88
import server.commands.AbstractCommand;
9+
import server.commands.CommandArgument;
910
import server.commands.CommandContext;
1011
import server.gateways.PlayerGateway;
1112
import server.permissions.Permissions;
@@ -141,8 +142,12 @@ private boolean isFinite(double v) {
141142
}
142143

143144
@Override
144-
public String[] getArgumentLabels() {
145-
return new String[] {"x", "y", "z", "player"};
145+
public CommandArgument[] getArgumentLabels() {
146+
return new CommandArgument[] {
147+
new CommandArgument("x", true),
148+
new CommandArgument("y", true),
149+
new CommandArgument("z", true),
150+
};
146151
}
147152

148153
@Override

0 commit comments

Comments
 (0)