From 5c063d6c3f8cce53bd4ebba5bbc7bebfdc2f2648 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Sat, 6 Sep 2025 04:12:22 +0200 Subject: [PATCH] Fixes TabExecutor being expected instead of TabCompleter --- .../knarlib/plugin/ConfigCommentPlugin.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/net/knarcraft/knarlib/plugin/ConfigCommentPlugin.java b/src/main/java/net/knarcraft/knarlib/plugin/ConfigCommentPlugin.java index d4925ff..e47d261 100644 --- a/src/main/java/net/knarcraft/knarlib/plugin/ConfigCommentPlugin.java +++ b/src/main/java/net/knarcraft/knarlib/plugin/ConfigCommentPlugin.java @@ -3,7 +3,7 @@ package net.knarcraft.knarlib.plugin; import net.knarcraft.knarlib.config.StargateYamlConfiguration; import org.bukkit.command.CommandExecutor; import org.bukkit.command.PluginCommand; -import org.bukkit.command.TabExecutor; +import org.bukkit.command.TabCompleter; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.java.JavaPlugin; @@ -31,16 +31,16 @@ public abstract class ConfigCommentPlugin extends JavaPlugin { /** * Instantiates a new ConfigCommentPlugin - * + * *

This is used for MockBukkit compatibility

* - * @param loader

The plugin loader to use

+ * @param loader

The plugin loader to use

* @param descriptionFile

The plugin description file to use

- * @param dataFolder

The data folder for plugin data

- * @param file

?

+ * @param dataFolder

The data folder for plugin data

+ * @param file

?

*/ protected ConfigCommentPlugin(@NotNull JavaPluginLoader loader, @NotNull PluginDescriptionFile descriptionFile, - @NotNull File dataFolder, @NotNull File file) { + @NotNull File dataFolder, @NotNull File file) { super(loader, descriptionFile, dataFolder, file); } @@ -81,16 +81,16 @@ public abstract class ConfigCommentPlugin extends JavaPlugin { * * @param commandName

The name of the command to register

* @param commandExecutor

The command executor to register for the command

- * @param tabExecutor

The tab executor to register for the command

+ * @param tabCompleter

The tab completer to register for the command

*/ @SuppressWarnings("SameParameterValue") protected void registerCommand(@NotNull String commandName, @NotNull CommandExecutor commandExecutor, - @Nullable TabExecutor tabExecutor) { + @Nullable TabCompleter tabCompleter) { PluginCommand pluginCommand = this.getCommand(commandName); if (pluginCommand != null) { pluginCommand.setExecutor(commandExecutor); - if (tabExecutor != null) { - pluginCommand.setTabCompleter(tabExecutor); + if (tabCompleter != null) { + pluginCommand.setTabCompleter(tabCompleter); } } else { getLogger().log(Level.SEVERE, "Failed to register command " + commandName);