mirror of
https://github.com/plexusorg/Plex.git
synced 2026-06-04 05:26:55 +00:00
Tab completer improvements (#80)
* Attempt to improve the tab completion for Plex * i give up for the night * steven is a god * Fix permission node
This commit is contained in:
@@ -7,7 +7,6 @@ import dev.plex.command.annotation.CommandPermissions;
|
||||
import dev.plex.player.PlexPlayer;
|
||||
import dev.plex.punishment.Punishment;
|
||||
import dev.plex.punishment.PunishmentType;
|
||||
|
||||
import dev.plex.util.PlexUtils;
|
||||
import dev.plex.util.TimeUtils;
|
||||
import net.kyori.adventure.text.Component;
|
||||
@@ -39,7 +38,7 @@ public class MuteCMD extends PlexCommand
|
||||
return messageComponent("playerMuted");
|
||||
}
|
||||
|
||||
if (silentCheckPermission(player,"plex.mute"))
|
||||
if (silentCheckPermission(player, "plex.mute"))
|
||||
{
|
||||
send(sender, messageComponent("higherRankThanYou"));
|
||||
return null;
|
||||
@@ -60,8 +59,8 @@ public class MuteCMD extends PlexCommand
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<String> tabComplete(@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 && silentCheckPermission(sender,"plex.mute") ? PlexUtils.getPlayerNameList() : ImmutableList.of();
|
||||
return args.length == 1 && silentCheckPermission(sender, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user