use of com.fastasyncworldedit.core.extent.transform.OffsetTransform in project FastAsyncWorldEdit by IntellectualSites.
the class OffsetTransformParser method parseFromInput.
@Override
protected ResettableExtent parseFromInput(@Nonnull String[] arguments, ParserContext context) throws InputParseException {
if (arguments.length != 3 && arguments.length != 4) {
throw new InputParseException(Caption.of("fawe.error.command.syntax", TextComponent.of("#offset[x][y][z]")));
}
int xOffset = Integer.parseInt(arguments[0]);
int yOffset = Integer.parseInt(arguments[1]);
int zOffset = Integer.parseInt(arguments[2]);
Extent extent;
extent = arguments.length == 4 ? worldEdit.getTransformFactory().parseFromInput(arguments[3], context) : context.requireExtent();
return new OffsetTransform(extent, xOffset, yOffset, zOffset);
}
Aggregations