Fixes TabExecutor being expected instead of TabCompleter
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				KnarCraft/KnarLib/pipeline/head This commit looks good
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	KnarCraft/KnarLib/pipeline/head This commit looks good
				
			This commit is contained in:
		@@ -3,7 +3,7 @@ package net.knarcraft.knarlib.plugin;
 | 
				
			|||||||
import net.knarcraft.knarlib.config.StargateYamlConfiguration;
 | 
					import net.knarcraft.knarlib.config.StargateYamlConfiguration;
 | 
				
			||||||
import org.bukkit.command.CommandExecutor;
 | 
					import org.bukkit.command.CommandExecutor;
 | 
				
			||||||
import org.bukkit.command.PluginCommand;
 | 
					import org.bukkit.command.PluginCommand;
 | 
				
			||||||
import org.bukkit.command.TabExecutor;
 | 
					import org.bukkit.command.TabCompleter;
 | 
				
			||||||
import org.bukkit.configuration.file.FileConfiguration;
 | 
					import org.bukkit.configuration.file.FileConfiguration;
 | 
				
			||||||
import org.bukkit.plugin.PluginDescriptionFile;
 | 
					import org.bukkit.plugin.PluginDescriptionFile;
 | 
				
			||||||
import org.bukkit.plugin.java.JavaPlugin;
 | 
					import org.bukkit.plugin.java.JavaPlugin;
 | 
				
			||||||
@@ -81,16 +81,16 @@ public abstract class ConfigCommentPlugin extends JavaPlugin {
 | 
				
			|||||||
     *
 | 
					     *
 | 
				
			||||||
     * @param commandName     <p>The name of the command to register</p>
 | 
					     * @param commandName     <p>The name of the command to register</p>
 | 
				
			||||||
     * @param commandExecutor <p>The command executor to register for the command</p>
 | 
					     * @param commandExecutor <p>The command executor to register for the command</p>
 | 
				
			||||||
     * @param tabExecutor     <p>The tab executor to register for the command</p>
 | 
					     * @param tabCompleter    <p>The tab completer to register for the command</p>
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    @SuppressWarnings("SameParameterValue")
 | 
					    @SuppressWarnings("SameParameterValue")
 | 
				
			||||||
    protected void registerCommand(@NotNull String commandName, @NotNull CommandExecutor commandExecutor,
 | 
					    protected void registerCommand(@NotNull String commandName, @NotNull CommandExecutor commandExecutor,
 | 
				
			||||||
                                 @Nullable TabExecutor tabExecutor) {
 | 
					                                   @Nullable TabCompleter tabCompleter) {
 | 
				
			||||||
        PluginCommand pluginCommand = this.getCommand(commandName);
 | 
					        PluginCommand pluginCommand = this.getCommand(commandName);
 | 
				
			||||||
        if (pluginCommand != null) {
 | 
					        if (pluginCommand != null) {
 | 
				
			||||||
            pluginCommand.setExecutor(commandExecutor);
 | 
					            pluginCommand.setExecutor(commandExecutor);
 | 
				
			||||||
            if (tabExecutor != null) {
 | 
					            if (tabCompleter != null) {
 | 
				
			||||||
                pluginCommand.setTabCompleter(tabExecutor);
 | 
					                pluginCommand.setTabCompleter(tabCompleter);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            getLogger().log(Level.SEVERE, "Failed to register command " + commandName);
 | 
					            getLogger().log(Level.SEVERE, "Failed to register command " + commandName);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user