diff --git a/core/src/main/java/com/sk89q/worldedit/command/ClipboardCommands.java b/core/src/main/java/com/sk89q/worldedit/command/ClipboardCommands.java index e559cae4..dcae18d4 100644 --- a/core/src/main/java/com/sk89q/worldedit/command/ClipboardCommands.java +++ b/core/src/main/java/com/sk89q/worldedit/command/ClipboardCommands.java @@ -31,7 +31,6 @@ import com.boydti.fawe.object.io.FastByteArrayOutputStream; import com.boydti.fawe.object.schematic.Schematic; import com.boydti.fawe.util.ImgurUtility; import com.boydti.fawe.util.MaskTraverser; -import com.boydti.fawe.util.chat.Message; import com.sk89q.minecraft.util.commands.Command; import com.sk89q.minecraft.util.commands.CommandContext; import com.sk89q.minecraft.util.commands.CommandException; @@ -316,7 +315,7 @@ public class ClipboardCommands extends MethodCommands { if (url == null) { BBC.GENERATING_LINK_FAILED.send(player); } else { - new Message(BBC.DOWNLOAD_LINK, url).link(url.getPath()).send(player); + BBC.DOWNLOAD_LINK.send(player, url.getPath()); } } diff --git a/core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java b/core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java index f318fda4..ae6812e2 100644 --- a/core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java +++ b/core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java @@ -817,8 +817,6 @@ public class UtilityCommands extends MethodCommands { } } catch (NumberFormatException ignored) { } - String baseCommand = (prefix.equals("/") ? Commands.getAlias(UtilityCommands.class, "/help") : prefix); - if (effectiveLength > 0) baseCommand += " " + args.getString(0, effectiveLength - 1); boolean isRootLevel = true; List visited = new ArrayList(); @@ -966,7 +964,7 @@ public class UtilityCommands extends MethodCommands { msg.newline(); } msg.text(BBC.HELP_FOOTER).link("https://git.io/vSKE5").newline(); - msg.paginate(baseCommand, 0, 1); + msg.paginate((prefix.equals("/") ? Commands.getAlias(UtilityCommands.class, "/help") : prefix), 0, 1); msg.send(actor); return; } @@ -989,7 +987,6 @@ public class UtilityCommands extends MethodCommands { int end = Math.min(offset + perPage, aliases.size()); List subAliases = aliases.subList(offset, end); List subPrefixes = prefixes.subList(offset, end); - boolean first = true; // Add each command for (int i = 0; i < subAliases.size(); i++) { @@ -1006,7 +1003,7 @@ public class UtilityCommands extends MethodCommands { String s2 = mapping.getDescription().getDescription(); if (c.testPermission(locals)) { msg.text(BBC.HELP_ITEM_ALLOWED, s1, s2); - String helpCmd = baseCommand + " " + mapping.getPrimaryAlias(); + String helpCmd = (prefix.equals("/") ? Commands.getAlias(UtilityCommands.class, "/help") + " " : "") + s1; msg.cmdTip(helpCmd); msg.newline(); } else { @@ -1016,6 +1013,8 @@ public class UtilityCommands extends MethodCommands { if (args.argsLength() == 0) { msg.text(BBC.HELP_FOOTER).newline(); } + String baseCommand = (prefix.equals("/") ? Commands.getAlias(UtilityCommands.class, "/help") : prefix); + if (effectiveLength > 0) baseCommand += " " + args.getString(0, effectiveLength - 1); msg.paginate(baseCommand, page + 1, pageTotal); } msg.send(actor); diff --git a/core/src/main/java/com/sk89q/worldedit/command/tool/BrushTool.java b/core/src/main/java/com/sk89q/worldedit/command/tool/BrushTool.java index 4133c6f6..44c22a49 100644 --- a/core/src/main/java/com/sk89q/worldedit/command/tool/BrushTool.java +++ b/core/src/main/java/com/sk89q/worldedit/command/tool/BrushTool.java @@ -192,14 +192,12 @@ public class BrushTool implements DoubleActionTraceTool, ScrollTool, MovableTool public void setPrimary(BrushSettings primary) { checkNotNull(primary); - if (this.secondary.getBrush() == null) this.secondary = primary; this.primary = primary; this.context = primary; } public void setSecondary(BrushSettings secondary) { checkNotNull(secondary); - if (this.primary.getBrush() == null) this.primary = secondary; this.secondary = secondary; this.context = secondary; }