Fix permission node

This commit is contained in:
Telesphoreo 2024-01-20 11:27:16 -06:00
parent 6d5620887b
commit 4c458540bb
2 changed files with 3 additions and 4 deletions

View File

@ -21,7 +21,6 @@ import org.jetbrains.annotations.Nullable;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.concurrent.CompletableFuture;
@CommandParameters(name = "pdebug", description = "Plex's debug command", usage = "/<command> <aliases <command> | redis-reset <player> | gamerules>") @CommandParameters(name = "pdebug", description = "Plex's debug command", usage = "/<command> <aliases <command> | redis-reset <player> | gamerules>")
@CommandPermissions(permission = "plex.debug") @CommandPermissions(permission = "plex.debug")
@ -93,6 +92,6 @@ public class DebugCMD extends PlexCommand
@Override @Override
public @NotNull List<String> smartTabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) throws IllegalArgumentException public @NotNull List<String> smartTabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) throws IllegalArgumentException
{ {
return args.length == 1 ? PlexUtils.getPlayerNameList() : ImmutableList.of(); return args.length == 1 && silentCheckPermission(sender, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
} }
} }

View File

@ -61,11 +61,11 @@ public class RemoveLoginMessageCMD extends PlexCommand
{ {
if (args.length == 1) if (args.length == 1)
{ {
if (silentCheckPermission(sender, "plex.removeloginmessage")) if (silentCheckPermission(sender, "plex.removeloginmessage.others"))
{ {
return List.of("-o"); return List.of("-o");
} }
} }
return args.length == 2 && silentCheckPermission(sender, "plex.removeloginmessage") ? PlexUtils.getPlayerNameList() : ImmutableList.of(); return args.length == 2 && silentCheckPermission(sender, "plex.removeloginmessage.others") ? PlexUtils.getPlayerNameList() : ImmutableList.of();
} }
} }