3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 02:50:06 +01:00

Handle NoMatchException in WorldEditBinding.

Dieser Commit ist enthalten in:
sk89q 2014-06-28 17:37:13 -07:00
Ursprung e261e720b6
Commit 93a48bbb55

Datei anzeigen

@ -23,6 +23,7 @@ import com.sk89q.worldedit.*;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.entity.Entity;
import com.sk89q.worldedit.entity.Player;
import com.sk89q.worldedit.extension.input.NoMatchException;
import com.sk89q.worldedit.extension.input.ParserContext;
import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.function.mask.Mask;
@ -160,7 +161,11 @@ public class WorldEditBinding extends BindingHelper {
parserContext.setWorld(((Entity) actor).getWorld());
}
parserContext.setSession(worldEdit.getSessionManager().get(actor));
try {
return worldEdit.getBlockRegistry().parseFromInput(context.next(), parserContext);
} catch (NoMatchException e) {
throw new ParameterException(e.getMessage(), e);
}
}
/**
@ -182,7 +187,11 @@ public class WorldEditBinding extends BindingHelper {
parserContext.setWorld(((Entity) actor).getWorld());
}
parserContext.setSession(worldEdit.getSessionManager().get(actor));
try {
return worldEdit.getPatternRegistry().parseFromInput(context.next(), parserContext);
} catch (NoMatchException e) {
throw new ParameterException(e.getMessage(), e);
}
}
/**
@ -204,7 +213,11 @@ public class WorldEditBinding extends BindingHelper {
parserContext.setWorld(((Entity) actor).getWorld());
}
parserContext.setSession(worldEdit.getSessionManager().get(actor));
try {
return worldEdit.getMaskRegistry().parseFromInput(context.next(), parserContext);
} catch (NoMatchException e) {
throw new ParameterException(e.getMessage(), e);
}
}
/**