package net.knarcraft.dropper.command; import net.knarcraft.dropper.util.TabCompleteHelper; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.command.TabCompleter; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.List; /** * The tab-completer for the remove arena command */ public class RemoveArenaTabCompleter implements TabCompleter { @Nullable @Override public List onTabComplete(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, @NotNull String[] arguments) { if (arguments.length == 1) { return TabCompleteHelper.getArenas(); } else { return new ArrayList<>(); } } }