Skip to content

Commit 18275d5

Browse files
committed
add empty args check
1 parent 8da3003 commit 18275d5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ public class BroadcastCommand extends AbstractCommand {
88

99
@Override
1010
public void execute(CommandContext ctx) {
11+
if (ctx.getArgs().isEmpty()) {
12+
ctx.reply("Missing argument <message>.");
13+
return;
14+
}
15+
1116
String message = String.join(" ", ctx.getArgs());
1217
ctx.broadcast(message);
1318
}

0 commit comments

Comments
 (0)