geforkt von Mirrors/FastAsyncWorldEdit
Correctly unwrap old CommandExceptions in AsyncCommandBuilder.
Dieser Commit ist enthalten in:
Ursprung
7787f2c15e
Commit
6e833a9fe4
@ -20,6 +20,7 @@
|
||||
package com.sk89q.worldedit.command.util;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
import com.google.common.util.concurrent.ListeningExecutorService;
|
||||
import com.sk89q.worldedit.extension.platform.Actor;
|
||||
@ -142,6 +143,9 @@ public final class AsyncCommandBuilder<T> {
|
||||
try {
|
||||
if (exceptionConverter != null) {
|
||||
try {
|
||||
if (orig instanceof com.sk89q.minecraft.util.commands.CommandException) {
|
||||
throw new CommandExecutionException(orig, ImmutableList.of());
|
||||
}
|
||||
exceptionConverter.convert(orig);
|
||||
throw orig;
|
||||
} catch (CommandException converted) {
|
||||
|
@ -79,7 +79,7 @@ public abstract class PaginationBox extends MessageBox {
|
||||
|
||||
public Component create(int page) throws InvalidComponentException {
|
||||
if (page == 1 && getComponentsSize() == 0) {
|
||||
return getContents().reset().append("There's nothing to see here").create();
|
||||
return getContents().reset().append("No results found.").create();
|
||||
}
|
||||
int pageCount = (int) Math.ceil(getComponentsSize() / (double) componentsPerPage);
|
||||
if (page < 1 || page > pageCount) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren