mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	Fixed command recommendations
This commit is contained in:
		@@ -335,13 +335,13 @@ public class MainCommand extends CommandManager<PlotPlayer> {
 | 
			
		||||
        if (cmd == null) {
 | 
			
		||||
            MainUtil.sendMessage(plr, C.NOT_VALID_SUBCOMMAND);
 | 
			
		||||
            {
 | 
			
		||||
                ArrayList<Command<PlotPlayer>> cmds = getCommands();
 | 
			
		||||
                List<Command<PlotPlayer>> cmds = getCommands(null, plr);
 | 
			
		||||
                cmd = new StringComparison<>(label, cmds).getMatchObject();
 | 
			
		||||
                if (cmd == null) {
 | 
			
		||||
                    MainUtil.sendMessage(plr, C.DID_YOU_MEAN, "/plot help");
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    MainUtil.sendMessage(plr, C.DID_YOU_MEAN, cmd.getUsage().replaceAll("\\{label\\}", label));
 | 
			
		||||
                    MainUtil.sendMessage(plr, C.DID_YOU_MEAN, cmd.getUsage().replaceAll("\\{label\\}", parts[0]));
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            return CommandHandlingOutput.NOT_FOUND;
 | 
			
		||||
 
 | 
			
		||||
@@ -29,6 +29,7 @@ import java.util.ArrayList;
 | 
			
		||||
import com.intellectualcrafters.plot.PS;
 | 
			
		||||
import com.intellectualcrafters.plot.object.PlotPlayer;
 | 
			
		||||
import com.intellectualcrafters.plot.util.MainUtil;
 | 
			
		||||
import com.intellectualcrafters.plot.util.StringMan;
 | 
			
		||||
import com.intellectualcrafters.plot.util.TaskManager;
 | 
			
		||||
import com.plotsquared.general.commands.CommandDeclaration;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user