mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-25 03:55:35 +01:00
Fixes #665 & Fix download button not being clickable
This commit is contained in:
parent
5f05b5a58a
commit
12fd9b0d62
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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<String> visited = new ArrayList<String>();
|
||||
@ -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<CommandMapping> subAliases = aliases.subList(offset, end);
|
||||
List<String> 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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user