mirror of
https://github.com/plexusorg/Plex.git
synced 2024-05-28 07:21:27 +00:00
steven is a god
This commit is contained in:
parent
9e333a50b9
commit
6d5620887b
|
@ -1,11 +0,0 @@
|
|||
package dev.plex.command;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IPlexCommand
|
||||
{
|
||||
@NotNull List<String> tabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args, List<String> list) throws IllegalArgumentException;
|
||||
}
|
|
@ -29,7 +29,7 @@ import java.util.UUID;
|
|||
/**
|
||||
* Superclass for all commands
|
||||
*/
|
||||
public abstract class PlexCommand extends Command implements PluginIdentifiableCommand, IPlexCommand
|
||||
public abstract class PlexCommand extends Command implements PluginIdentifiableCommand
|
||||
{
|
||||
/**
|
||||
* Returns the instance of the plugin
|
||||
|
@ -157,7 +157,6 @@ public abstract class PlexCommand extends Command implements PluginIdentifiableC
|
|||
try
|
||||
{
|
||||
Component component = this.execute(sender, isConsole(sender) ? null : (Player) sender, args);
|
||||
this.tabComplete(sender, label, args, List.of(args));
|
||||
if (component != null)
|
||||
{
|
||||
send(sender, component);
|
||||
|
@ -172,15 +171,14 @@ public abstract class PlexCommand extends Command implements PluginIdentifiableC
|
|||
}
|
||||
|
||||
@NotNull
|
||||
public abstract List<String> tabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) throws IllegalArgumentException;
|
||||
public abstract List<String> smartTabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) throws IllegalArgumentException;
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<String> tabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args, List<String> list) throws IllegalArgumentException
|
||||
public List<String> tabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) throws IllegalArgumentException
|
||||
{
|
||||
list = tabComplete(sender, alias, args);
|
||||
List<String> list = smartTabComplete(sender, alias, args);
|
||||
return StringUtil.copyPartialMatches(args[args.length - 1], list, Lists.newArrayList());
|
||||
//return List.of("test1", "test2");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -59,7 +59,7 @@ public class AdminChatCMD 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 Collections.emptyList();
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ public class AdminworldCMD 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 Collections.emptyList();
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public class AdventureCMD 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
|
||||
{
|
||||
if (silentCheckPermission(sender, "plex.gamemode.adventure.others"))
|
||||
{
|
||||
|
|
|
@ -129,7 +129,7 @@ public class BanCMD 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, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package dev.plex.command.impl;
|
||||
|
||||
import dev.plex.command.IPlexCommand;
|
||||
import dev.plex.command.PlexCommand;
|
||||
import dev.plex.command.annotation.CommandParameters;
|
||||
import dev.plex.command.annotation.CommandPermissions;
|
||||
|
@ -20,7 +19,7 @@ import java.util.List;
|
|||
|
||||
@CommandPermissions(permission = "plex.blockedit")
|
||||
@CommandParameters(name = "blockedit", usage = "/<command> [list | purge | all | <player>]", aliases = "bedit", description = "Prevent players from modifying blocks")
|
||||
public class BlockEditCMD extends PlexCommand implements IPlexCommand
|
||||
public class BlockEditCMD extends PlexCommand
|
||||
{
|
||||
private final BlockListener bl = new BlockListener();
|
||||
|
||||
|
@ -102,7 +101,7 @@ public class BlockEditCMD extends PlexCommand implements IPlexCommand
|
|||
}
|
||||
|
||||
@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
|
||||
{
|
||||
if (silentCheckPermission(sender, this.getPermission()))
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@ public class CommandSpyCMD 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 Collections.emptyList();
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public class ConsoleSayCMD 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 Collections.emptyList();
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public class CreativeCMD 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
|
||||
{
|
||||
if (silentCheckPermission(sender, "plex.gamemode.creative.others"))
|
||||
{
|
||||
|
|
|
@ -91,7 +91,7 @@ public class DebugCMD 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 ? PlexUtils.getPlayerNameList() : ImmutableList.of();
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ public class EntityWipeCMD extends PlexCommand
|
|||
return null;
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
if (silentCheckPermission(sender, this.getPermission()))
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@ public class FlatlandsCMD 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 Collections.emptyList();
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public class FreezeCMD 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, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ public class GamemodeCMD 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
|
||||
{
|
||||
if (args.length == 1)
|
||||
{
|
||||
|
|
|
@ -70,7 +70,7 @@ public class KickCMD 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, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ public class ListCMD extends PlexCommand
|
|||
return list;
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
if (args.length == 1 && silentCheckPermission(sender, this.getPermission()))
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@ public class LocalSpawnCMD 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 Collections.emptyList();
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public class LockupCMD 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, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ public class MasterbuilderworldCMD 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 Collections.emptyList();
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ public class MobPurgeCMD extends PlexCommand
|
|||
return mobs;
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
if (args.length == 1 && silentCheckPermission(sender, this.getPermission()))
|
||||
{
|
||||
|
|
|
@ -59,7 +59,7 @@ 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, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ public class NotesCMD 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
|
||||
{
|
||||
if (silentCheckPermission(sender, this.getPermission()))
|
||||
{
|
||||
|
|
|
@ -126,7 +126,7 @@ public class PlexCMD 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
|
||||
{
|
||||
if (args.length == 1)
|
||||
{
|
||||
|
|
|
@ -49,7 +49,7 @@ public class PunishmentsCMD 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, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ public class RawSayCMD 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 Collections.emptyList();
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ public class RemoveLoginMessageCMD 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
|
||||
{
|
||||
if (args.length == 1)
|
||||
{
|
||||
|
|
|
@ -32,7 +32,7 @@ public class SayCMD 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 Collections.emptyList();
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ public class SetLoginMessageCMD 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
|
||||
{
|
||||
if (args.length == 1)
|
||||
{
|
||||
|
|
|
@ -135,7 +135,7 @@ public class SmiteCMD 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
|
||||
{
|
||||
if (silentCheckPermission(sender, this.getPermission()) && args.length == 1)
|
||||
{
|
||||
|
|
|
@ -56,7 +56,7 @@ public class SpectatorCMD 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
|
||||
{
|
||||
if (silentCheckPermission(sender,"plex.gamemode.spectator.others"))
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@ public class SurvivalCMD 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
|
||||
{
|
||||
if (silentCheckPermission(sender,"plex.gamemode.survival.others"))
|
||||
{
|
||||
|
|
|
@ -94,7 +94,7 @@ public class TagCMD 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
|
||||
{
|
||||
if (args.length == 1)
|
||||
{
|
||||
|
|
|
@ -117,7 +117,7 @@ public class TempbanCMD 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, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ public class ToggleCMD 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, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public class UnbanCMD 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, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public class UnfreezeCMD 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, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public class UnmuteCMD 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, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ public class WhoHasCMD 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, this.getPermission()) ? Arrays.stream(Material.values()).map(Enum::name).toList() : ImmutableList.of();
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ public class WorldCMD 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
|
||||
{
|
||||
final List<String> completions = Lists.newArrayList();
|
||||
final Player player = (Player) sender;
|
||||
|
|
Loading…
Reference in a new issue