diff --git a/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java b/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java index 00520dcd3..a51c8f274 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java @@ -335,13 +335,13 @@ public class MainCommand extends CommandManager { if (cmd == null) { MainUtil.sendMessage(plr, C.NOT_VALID_SUBCOMMAND); { - ArrayList> cmds = getCommands(); + List> 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; diff --git a/src/main/java/com/intellectualcrafters/plot/commands/plugin.java b/src/main/java/com/intellectualcrafters/plot/commands/plugin.java index 036c8c9d9..fd6843d75 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/plugin.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/plugin.java @@ -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;