Fix tabcomplete
This commit is contained in:
parent
c2d726e9a6
commit
41a97ef3aa
@ -6,6 +6,7 @@ import com.github.Anon8281.universalScheduler.UniversalScheduler;
|
||||
import com.github.Anon8281.universalScheduler.scheduling.schedulers.TaskScheduler;
|
||||
import fr.xephi.authme.api.v3.AuthMeApi;
|
||||
import fr.xephi.authme.command.CommandHandler;
|
||||
import fr.xephi.authme.command.TabCompleteHandler;
|
||||
import fr.xephi.authme.datasource.DataSource;
|
||||
import fr.xephi.authme.initialization.DataFolder;
|
||||
import fr.xephi.authme.initialization.DataSourceProvider;
|
||||
@ -57,6 +58,7 @@ import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
import java.util.Scanner;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.Level;
|
||||
@ -206,9 +208,10 @@ public class AuthMe extends JavaPlugin {
|
||||
"/_/ |_\\__,_/\\__/_/ /_/_/ /_/\\___/ \n" +
|
||||
" ");
|
||||
}
|
||||
// Successful message
|
||||
//detect server brand with classloader
|
||||
checkServerType();
|
||||
Objects.requireNonNull(getCommand("register")).setTabCompleter(new TabCompleteHandler());
|
||||
Objects.requireNonNull(getCommand("login")).setTabCompleter(new TabCompleteHandler());
|
||||
logger.info("AuthMeReReloaded is enabled successfully!");
|
||||
// Purge on start if enabled
|
||||
PurgeService purgeService = injector.getSingleton(PurgeService.class);
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
package fr.xephi.authme.command;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabCompleter;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class TabCompleteHandler implements TabCompleter {
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String[] args) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user