Skip to content

Commit 79bb461

Browse files
committed
Only send tab completion if player has permission
1 parent 58ece45 commit 79bb461

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deepslateMC-server/src/main/java/de/pascalpex/deepslatemc/commands/DeepslateCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public DeepslateCommand(String name) {
2727

2828
@Override
2929
public @NotNull List<String> tabComplete(@NotNull CommandSender sender, @NotNull String alias, String[] args, Location location) throws IllegalArgumentException {
30-
if (args.length == 1) {
30+
if (args.length == 1 && sender.hasPermission("deepslate.command")) {
3131
return Stream.of("reload", "version")
3232
.filter(arg -> arg.startsWith(args[0].toLowerCase()))
3333
.collect(Collectors.toList());

0 commit comments

Comments
 (0)