Skip to content

Commit

Permalink
Do not show tabCompletion when mainCommand is not in CMDHelpType.FULL
Browse files Browse the repository at this point in the history
  • Loading branch information
EverNife committed Apr 18, 2023
1 parent 0c3fdbb commit d83fcfd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import br.com.finalcraft.evernifecore.commands.finalcmd.FinalCMDManager;
import br.com.finalcraft.evernifecore.commands.finalcmd.IFinalCMDExecutor;
import br.com.finalcraft.evernifecore.commands.finalcmd.accessvalidation.CMDAccessValidation;
import br.com.finalcraft.evernifecore.commands.finalcmd.annotations.CMDHelpType;
import br.com.finalcraft.evernifecore.commands.finalcmd.annotations.data.FinalCMDData;
import br.com.finalcraft.evernifecore.commands.finalcmd.executor.CMDMethodInterpreter;
import br.com.finalcraft.evernifecore.commands.finalcmd.executor.FCDefaultExecutor;
Expand Down Expand Up @@ -180,7 +181,7 @@ public List<String> tabComplete(CommandSender sender, String alias, String[] arg

//The TabComplete is based on the FirstArg.
CMDMethodInterpreter interpreter = (args.length == 0 || args[0].isEmpty()) ? null : getSubCommand(args[0]);
if (interpreter == null){
if (interpreter == null && mainInterpreter != null && ((FinalCMDData)mainInterpreter.getCmdData()).getHelpType() == CMDHelpType.FULL){
interpreter = mainInterpreter;
}

Expand Down

0 comments on commit d83fcfd

Please sign in to comment.