steven is a god

This commit is contained in:
Telesphoreo 2024-01-20 11:14:33 -06:00
parent 9e333a50b9
commit 6d5620887b
40 changed files with 43 additions and 57 deletions

View File

@ -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;
}

View File

@ -29,7 +29,7 @@ import java.util.UUID;
/** /**
* Superclass for all commands * 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 * Returns the instance of the plugin
@ -157,7 +157,6 @@ public abstract class PlexCommand extends Command implements PluginIdentifiableC
try try
{ {
Component component = this.execute(sender, isConsole(sender) ? null : (Player) sender, args); Component component = this.execute(sender, isConsole(sender) ? null : (Player) sender, args);
this.tabComplete(sender, label, args, List.of(args));
if (component != null) if (component != null)
{ {
send(sender, component); send(sender, component);
@ -172,15 +171,14 @@ public abstract class PlexCommand extends Command implements PluginIdentifiableC
} }
@NotNull @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 @NotNull
@Override @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 StringUtil.copyPartialMatches(args[args.length - 1], list, Lists.newArrayList());
//return List.of("test1", "test2");
} }
/** /**

View File

@ -59,7 +59,7 @@ public class AdminChatCMD extends PlexCommand
} }
@Override @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(); return Collections.emptyList();
} }

View File

@ -34,7 +34,7 @@ public class AdminworldCMD extends PlexCommand
} }
@Override @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(); return Collections.emptyList();
} }

View File

@ -53,7 +53,7 @@ public class AdventureCMD extends PlexCommand
} }
@Override @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")) if (silentCheckPermission(sender, "plex.gamemode.adventure.others"))
{ {

View File

@ -129,7 +129,7 @@ public class BanCMD extends PlexCommand
} }
@Override @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(); return args.length == 1 && silentCheckPermission(sender, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
} }

View File

@ -1,6 +1,5 @@
package dev.plex.command.impl; package dev.plex.command.impl;
import dev.plex.command.IPlexCommand;
import dev.plex.command.PlexCommand; import dev.plex.command.PlexCommand;
import dev.plex.command.annotation.CommandParameters; import dev.plex.command.annotation.CommandParameters;
import dev.plex.command.annotation.CommandPermissions; import dev.plex.command.annotation.CommandPermissions;
@ -20,7 +19,7 @@ import java.util.List;
@CommandPermissions(permission = "plex.blockedit") @CommandPermissions(permission = "plex.blockedit")
@CommandParameters(name = "blockedit", usage = "/<command> [list | purge | all | <player>]", aliases = "bedit", description = "Prevent players from modifying blocks") @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(); private final BlockListener bl = new BlockListener();
@ -102,7 +101,7 @@ public class BlockEditCMD extends PlexCommand implements IPlexCommand
} }
@Override @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())) if (silentCheckPermission(sender, this.getPermission()))
{ {

View File

@ -35,7 +35,7 @@ public class CommandSpyCMD extends PlexCommand
} }
@Override @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(); return Collections.emptyList();
} }

View File

@ -32,7 +32,7 @@ public class ConsoleSayCMD extends PlexCommand
} }
@Override @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(); return Collections.emptyList();
} }

View File

@ -56,7 +56,7 @@ public class CreativeCMD extends PlexCommand
} }
@Override @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")) if (silentCheckPermission(sender, "plex.gamemode.creative.others"))
{ {

View File

@ -91,7 +91,7 @@ public class DebugCMD extends PlexCommand
} }
@Override @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(); return args.length == 1 ? PlexUtils.getPlayerNameList() : ImmutableList.of();
} }

View File

@ -106,7 +106,7 @@ public class EntityWipeCMD extends PlexCommand
return null; 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())) if (silentCheckPermission(sender, this.getPermission()))
{ {

View File

@ -33,7 +33,7 @@ public class FlatlandsCMD extends PlexCommand
} }
@Override @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(); return Collections.emptyList();
} }

View File

@ -53,7 +53,7 @@ public class FreezeCMD extends PlexCommand
} }
@Override @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(); return args.length == 1 && silentCheckPermission(sender, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
} }

View File

@ -88,7 +88,7 @@ public class GamemodeCMD extends PlexCommand
} }
@Override @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) if (args.length == 1)
{ {

View File

@ -70,7 +70,7 @@ public class KickCMD extends PlexCommand
} }
@Override @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(); return args.length == 1 && silentCheckPermission(sender, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
} }

View File

@ -65,7 +65,7 @@ public class ListCMD extends PlexCommand
return list; 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())) if (args.length == 1 && silentCheckPermission(sender, this.getPermission()))
{ {

View File

@ -27,7 +27,7 @@ public class LocalSpawnCMD extends PlexCommand
} }
@Override @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(); return Collections.emptyList();
} }

View File

@ -38,7 +38,7 @@ public class LockupCMD extends PlexCommand
} }
@Override @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(); return args.length == 1 && silentCheckPermission(sender, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
} }

View File

@ -35,7 +35,7 @@ public class MasterbuilderworldCMD extends PlexCommand
} }
@Override @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(); return Collections.emptyList();
} }

View File

@ -111,7 +111,7 @@ public class MobPurgeCMD extends PlexCommand
return mobs; 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())) if (args.length == 1 && silentCheckPermission(sender, this.getPermission()))
{ {

View File

@ -59,7 +59,7 @@ public class MuteCMD extends PlexCommand
} }
@Override @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(); return args.length == 1 && silentCheckPermission(sender, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
} }

View File

@ -136,7 +136,7 @@ public class NotesCMD extends PlexCommand
} }
@Override @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())) if (silentCheckPermission(sender, this.getPermission()))
{ {

View File

@ -126,7 +126,7 @@ public class PlexCMD extends PlexCommand
} }
@Override @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) if (args.length == 1)
{ {

View File

@ -49,7 +49,7 @@ public class PunishmentsCMD extends PlexCommand
} }
@Override @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(); return args.length == 1 && silentCheckPermission(sender, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
} }

View File

@ -33,7 +33,7 @@ public class RawSayCMD extends PlexCommand
} }
@Override @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(); return Collections.emptyList();
} }

View File

@ -57,7 +57,7 @@ public class RemoveLoginMessageCMD extends PlexCommand
} }
@Override @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) if (args.length == 1)
{ {

View File

@ -32,7 +32,7 @@ public class SayCMD extends PlexCommand
} }
@Override @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(); return Collections.emptyList();
} }

View File

@ -84,7 +84,7 @@ public class SetLoginMessageCMD extends PlexCommand
} }
@Override @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) if (args.length == 1)
{ {

View File

@ -135,7 +135,7 @@ public class SmiteCMD extends PlexCommand
} }
@Override @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) if (silentCheckPermission(sender, this.getPermission()) && args.length == 1)
{ {

View File

@ -56,7 +56,7 @@ public class SpectatorCMD extends PlexCommand
} }
@Override @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")) if (silentCheckPermission(sender,"plex.gamemode.spectator.others"))
{ {

View File

@ -57,7 +57,7 @@ public class SurvivalCMD extends PlexCommand
} }
@Override @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")) if (silentCheckPermission(sender,"plex.gamemode.survival.others"))
{ {

View File

@ -94,7 +94,7 @@ public class TagCMD extends PlexCommand
} }
@Override @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) if (args.length == 1)
{ {

View File

@ -117,7 +117,7 @@ public class TempbanCMD extends PlexCommand
} }
@Override @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(); return args.length == 1 && silentCheckPermission(sender, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
} }

View File

@ -63,7 +63,7 @@ public class ToggleCMD extends PlexCommand
} }
@Override @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(); return args.length == 1 && silentCheckPermission(sender, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
} }

View File

@ -55,7 +55,7 @@ public class UnbanCMD extends PlexCommand
} }
@Override @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(); return args.length == 1 && silentCheckPermission(sender, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
} }

View File

@ -38,7 +38,7 @@ public class UnfreezeCMD extends PlexCommand
} }
@Override @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(); return args.length == 1 && silentCheckPermission(sender, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
} }

View File

@ -38,7 +38,7 @@ public class UnmuteCMD extends PlexCommand
} }
@Override @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(); return args.length == 1 && silentCheckPermission(sender, this.getPermission()) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
} }

View File

@ -45,7 +45,7 @@ public class WhoHasCMD extends PlexCommand
} }
@Override @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(); return args.length == 1 && silentCheckPermission(sender, this.getPermission()) ? Arrays.stream(Material.values()).map(Enum::name).toList() : ImmutableList.of();
} }

View File

@ -44,7 +44,7 @@ public class WorldCMD extends PlexCommand
} }
@Override @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 List<String> completions = Lists.newArrayList();
final Player player = (Player) sender; final Player player = (Player) sender;