Replace the message system

This commit is contained in:
Matthew Miller
2019-04-19 23:06:00 +10:00
parent d56cd96282
commit 5b1573a24e
20 changed files with 82 additions and 1180 deletions

View File

@ -77,7 +77,6 @@ import com.sk89q.worldedit.util.command.parametric.ExceptionConverter;
import com.sk89q.worldedit.util.command.parametric.LegacyCommandsHandler;
import com.sk89q.worldedit.util.command.parametric.ParametricBuilder;
import com.sk89q.worldedit.util.eventbus.Subscribe;
import com.sk89q.worldedit.util.formatting.ColorCodeBuilder;
import com.sk89q.worldedit.util.formatting.component.CommandUsageBox;
import com.sk89q.worldedit.util.logging.DynamicStreamHandler;
import com.sk89q.worldedit.util.logging.LogFormat;
@ -300,7 +299,7 @@ public final class CommandManager {
actor.printError("You are not permitted to do that. Are you in the right mode?");
} catch (InvalidUsageException e) {
if (e.isFullHelpSuggested()) {
actor.printRaw(ColorCodeBuilder.asColorCodes(new CommandUsageBox(e.getCommand(), e.getCommandUsed("/", ""), locals)));
actor.print(new CommandUsageBox(e.getCommand(), e.getCommandUsed("/", ""), locals));
String message = e.getMessage();
if (message != null) {
actor.printError(message);