mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-16 03:24:03 +00:00
Switch
This commit is contained in:
@@ -313,7 +313,7 @@ public class BrushCommands {
|
||||
@CommandPermissions("worldedit.brush.recursive")
|
||||
public BrushSettings recursiveBrush(Player player, LocalSession session, EditSession editSession, Pattern fill,
|
||||
@Arg(desc = "The radius to sample for blending", def = "5")
|
||||
double radius, @Switch('d') boolean depthFirst, CommandContext context) throws WorldEditException {
|
||||
double radius, @Switch(name='d', desc = "TODO") boolean depthFirst, CommandContext context) throws WorldEditException {
|
||||
worldEdit.checkMaxBrushRadius(radius);
|
||||
Brush brush = new RecurseBrush(depthFirst);
|
||||
CommandLocals locals = context.getLocals();
|
||||
@@ -358,7 +358,7 @@ public class BrushCommands {
|
||||
@CommandPermissions("worldedit.brush.line")
|
||||
public BrushSettings lineBrush(Player player, EditSession editSession, LocalSession session, Pattern fill,
|
||||
@Arg(desc = "The radius to sample for blending", def = "0")
|
||||
double radius, @Switch('h') boolean shell, @Switch('s') boolean select, @Switch('f') boolean flat, CommandContext context) throws WorldEditException {
|
||||
double radius, @Switch(name='h', desc = "TODO") boolean shell, @Switch(name='s', desc = "TODO") boolean select, @Switch(name='f', desc = "TODO") boolean flat, CommandContext context) throws WorldEditException {
|
||||
worldEdit.checkMaxBrushRadius(radius);
|
||||
Brush brush = new LineBrush(shell, select, flat);
|
||||
CommandLocals locals = context.getLocals();
|
||||
@@ -494,7 +494,7 @@ public class BrushCommands {
|
||||
@CommandPermissions("worldedit.brush.spline")
|
||||
public BrushSettings catenaryBrush(Player player, EditSession editSession, LocalSession session, Pattern fill, @Optional("1.2") @Range(min=1) double lengthFactor,
|
||||
@Arg(desc = "The radius to sample for blending", def = "0")
|
||||
double radius, @Switch('h') boolean shell, @Switch('s') boolean select, @Switch('d') boolean facingDirection, CommandContext context) throws WorldEditException {
|
||||
double radius, @Switch(name='h', desc = "TODO") boolean shell, @Switch(name='s', desc = "TODO") boolean select, @Switch(name='d', desc = "TODO") boolean facingDirection, CommandContext context) throws WorldEditException {
|
||||
worldEdit.checkMaxBrushRadius(radius);
|
||||
Brush brush = new CatenaryBrush(shell, select, facingDirection, lengthFactor);
|
||||
CommandLocals locals = context.getLocals();
|
||||
@@ -728,7 +728,7 @@ public class BrushCommands {
|
||||
"The -r flag will apply random rotation"
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.stencil")
|
||||
public BrushSettings stencilBrush(Player player, EditSession editSession, LocalSession session, Pattern fill, @Arg(name = "radius", desc = "Expression", def = "5") Expression radius, @Arg(name = "image", desc = "String", def = "") String image, @Optional("0") @Step(90) @Range(min=0, max=360) final int rotation, @Arg(name = "yscale", desc = "double", def = "1") final double yscale, @Switch('w') boolean onlyWhite, @Switch('r') boolean randomRotate, CommandContext context) throws WorldEditException, FileNotFoundException, ParameterException {
|
||||
public BrushSettings stencilBrush(Player player, EditSession editSession, LocalSession session, Pattern fill, @Arg(name = "radius", desc = "Expression", def = "5") Expression radius, @Arg(name = "image", desc = "String", def = "") String image, @Optional("0") @Step(90) @Range(min=0, max=360) final int rotation, @Arg(name = "yscale", desc = "double", def = "1") final double yscale, @Switch(name='w', desc = "TODO") boolean onlyWhite, @Switch(name='r', desc = "TODO") boolean randomRotate, CommandContext context) throws WorldEditException, FileNotFoundException, ParameterException {
|
||||
worldEdit.checkMaxBrushRadius(radius);
|
||||
InputStream stream = getHeightmapStream(image);
|
||||
HeightBrush brush;
|
||||
@@ -779,7 +779,7 @@ public class BrushCommands {
|
||||
"The -f blends the image with the existing terrain"
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.stencil")
|
||||
public BrushSettings imageBrush(Player player, EditSession editSession, LocalSession session, @Arg(name = "radius", desc = "Expression", def = "5") Expression radius, FawePrimitiveBinding.ImageUri imageUri, @Optional("1") @Range(min=Double.MIN_NORMAL) final double yscale, @Switch('a') boolean alpha, @Switch('f') boolean fadeOut, CommandContext context) throws WorldEditException, IOException, ParameterException {
|
||||
public BrushSettings imageBrush(Player player, EditSession editSession, LocalSession session, @Arg(name = "radius", desc = "Expression", def = "5") Expression radius, FawePrimitiveBinding.ImageUri imageUri, @Optional("1") @Range(min=Double.MIN_NORMAL) final double yscale, @Switch(name='a', desc = "TODO") boolean alpha, @Switch(name='f', desc = "TODO") boolean fadeOut, CommandContext context) throws WorldEditException, IOException, ParameterException {
|
||||
BufferedImage image = imageUri.load();
|
||||
worldEdit.checkMaxBrushRadius(radius);
|
||||
if (yscale != 1) {
|
||||
@@ -871,7 +871,7 @@ public class BrushCommands {
|
||||
"Video: https://youtu.be/RPZIaTbqoZw?t=34s"
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.scatter")
|
||||
public BrushSettings scatterBrush(Player player, EditSession editSession, LocalSession session, Pattern fill, @Arg(name = "radius", desc = "Expression", def = "5") Expression radius, @Arg(name = "points", desc = "double", def = "5") double points, @Arg(name = "distance", desc = "double", def = "1") double distance, @Switch('o') boolean overlay, CommandContext context) throws WorldEditException {
|
||||
public BrushSettings scatterBrush(Player player, EditSession editSession, LocalSession session, Pattern fill, @Arg(name = "radius", desc = "Expression", def = "5") Expression radius, @Arg(name = "points", desc = "double", def = "5") double points, @Arg(name = "distance", desc = "double", def = "1") double distance, @Switch(name='o', desc = "TODO") boolean overlay, CommandContext context) throws WorldEditException {
|
||||
worldEdit.checkMaxBrushRadius(radius);
|
||||
Brush brush;
|
||||
if (overlay) {
|
||||
@@ -917,7 +917,7 @@ public class BrushCommands {
|
||||
"The -r flag will apply random rotation"
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.populateschematic")
|
||||
public BrushSettings scatterSchemBrush(Player player, EditSession editSession, LocalSession session, Mask mask, String clipboard, @Arg(name = "radius", desc = "Expression", def = "30") Expression radius, @Arg(name = "density", desc = "double", def = "50") double density, @Switch('r') boolean rotate, CommandContext context) throws WorldEditException {
|
||||
public BrushSettings scatterSchemBrush(Player player, EditSession editSession, LocalSession session, Mask mask, String clipboard, @Arg(name = "radius", desc = "Expression", def = "30") Expression radius, @Arg(name = "density", desc = "double", def = "50") double density, @Switch(name='r', desc = "TODO") boolean rotate, CommandContext context) throws WorldEditException {
|
||||
worldEdit.checkMaxBrushRadius(radius);
|
||||
|
||||
|
||||
@@ -1415,7 +1415,7 @@ public class BrushCommands {
|
||||
"Snow Pic: https://i.imgur.com/Hrzn0I4.png"
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.height")
|
||||
public BrushSettings heightBrush(Player player, LocalSession session, @Arg(name = "radius", desc = "Expression", def = "5") Expression radius, @Arg(name = "image", desc = "String", def = "") final String image, @Optional("0") @Step(90) @Range(min=0, max=360) final int rotation, @Arg(name = "yscale", desc = "double", def = "1") final double yscale, @Switch('r') boolean randomRotate, @Switch('l') boolean layers, @Switch('s') boolean dontSmooth, CommandContext context) throws WorldEditException, FileNotFoundException, ParameterException {
|
||||
public BrushSettings heightBrush(Player player, LocalSession session, @Arg(name = "radius", desc = "Expression", def = "5") Expression radius, @Arg(name = "image", desc = "String", def = "") final String image, @Optional("0") @Step(90) @Range(min=0, max=360) final int rotation, @Arg(name = "yscale", desc = "double", def = "1") final double yscale, @Switch(name='r', desc = "TODO") boolean randomRotate, @Switch(name='l', desc = "TODO") boolean layers, @Switch(name='s', desc = "TODO") boolean dontSmooth, CommandContext context) throws WorldEditException, FileNotFoundException, ParameterException {
|
||||
return terrainBrush(player, session, radius, image, rotation, yscale, false, randomRotate, layers, !dontSmooth, ScalableHeightMap.Shape.CONE, context);
|
||||
}
|
||||
|
||||
@@ -1429,7 +1429,7 @@ public class BrushCommands {
|
||||
" - The `-s` flag disables smoothing"
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.height")
|
||||
public BrushSettings cliffBrush(Player player, LocalSession session, @Arg(name = "radius", desc = "Expression", def = "5") Expression radius, @Arg(name = "image", desc = "String", def = "") String image, @Optional("0") @Step(90) @Range(min=0, max=360) final int rotation, @Arg(name = "yscale", desc = "double", def = "1") final double yscale, @Switch('r') boolean randomRotate, @Switch('l') boolean layers, @Switch('s') boolean dontSmooth, CommandContext context) throws WorldEditException, FileNotFoundException, ParameterException {
|
||||
public BrushSettings cliffBrush(Player player, LocalSession session, @Arg(name = "radius", desc = "Expression", def = "5") Expression radius, @Arg(name = "image", desc = "String", def = "") String image, @Optional("0") @Step(90) @Range(min=0, max=360) final int rotation, @Arg(name = "yscale", desc = "double", def = "1") final double yscale, @Switch(name='r', desc = "TODO") boolean randomRotate, @Switch(name='l', desc = "TODO") boolean layers, @Switch(name='s', desc = "TODO") boolean dontSmooth, CommandContext context) throws WorldEditException, FileNotFoundException, ParameterException {
|
||||
return terrainBrush(player, session, radius, image, rotation, yscale, true, randomRotate, layers, !dontSmooth, ScalableHeightMap.Shape.CYLINDER, context);
|
||||
}
|
||||
|
||||
@@ -1443,7 +1443,7 @@ public class BrushCommands {
|
||||
desc = "This brush raises or lowers land towards the clicked point"
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.height")
|
||||
public BrushSettings flattenBrush(Player player, LocalSession session, @Arg(name = "radius", desc = "Expression", def = "5") Expression radius, @Arg(name = "image", desc = "String", def = "") final String image, @Optional("0") @Step(90) @Range(min=0, max=360) final int rotation, @Arg(name = "yscale", desc = "double", def = "1") final double yscale, @Switch('r') boolean randomRotate, @Switch('l') boolean layers, @Switch('s') boolean dontSmooth, CommandContext context) throws WorldEditException, FileNotFoundException, ParameterException {
|
||||
public BrushSettings flattenBrush(Player player, LocalSession session, @Arg(name = "radius", desc = "Expression", def = "5") Expression radius, @Arg(name = "image", desc = "String", def = "") final String image, @Optional("0") @Step(90) @Range(min=0, max=360) final int rotation, @Arg(name = "yscale", desc = "double", def = "1") final double yscale, @Switch(name='r', desc = "TODO") boolean randomRotate, @Switch(name='l', desc = "TODO") boolean layers, @Switch(name='s', desc = "TODO") boolean dontSmooth, CommandContext context) throws WorldEditException, FileNotFoundException, ParameterException {
|
||||
return terrainBrush(player, session, radius, image, rotation, yscale, true, randomRotate, layers, !dontSmooth, ScalableHeightMap.Shape.CONE, context);
|
||||
}
|
||||
|
||||
@@ -1519,7 +1519,7 @@ public class BrushCommands {
|
||||
"Video: https://www.youtube.com/watch?v=RPZIaTbqoZw"
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.copy")
|
||||
public BrushSettings copy(Player player, LocalSession session, @Arg(name = "radius", desc = "Expression", def = "5") Expression radius, @Switch('r') boolean randomRotate, @Switch('a') boolean autoRotate, CommandContext context) throws WorldEditException {
|
||||
public BrushSettings copy(Player player, LocalSession session, @Arg(name = "radius", desc = "Expression", def = "5") Expression radius, @Switch(name='r', desc = "TODO") boolean randomRotate, @Switch(name='a', desc = "TODO") boolean autoRotate, CommandContext context) throws WorldEditException {
|
||||
worldEdit.checkMaxBrushRadius(radius);
|
||||
player.print(BBC.BRUSH_COPY.f(radius));
|
||||
|
||||
|
@@ -30,8 +30,9 @@ import com.sk89q.worldedit.function.mask.Mask;
|
||||
import com.sk89q.worldedit.function.pattern.Pattern;
|
||||
import com.sk89q.worldedit.util.HandSide;
|
||||
import com.sk89q.worldedit.util.command.binding.Range;
|
||||
import com.sk89q.worldedit.util.command.binding.Switch;
|
||||
import com.sk89q.worldedit.util.command.parametric.Optional;
|
||||
import org.enginehub.piston.annotation.param.Arg;
|
||||
import org.enginehub.piston.annotation.param.Switch;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
@@ -62,7 +63,7 @@ public class BrushOptionsCommands extends MethodCommands {
|
||||
"use the -g flag to save globally"
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.save")
|
||||
public void saveBrush(Player player, LocalSession session, String name, @Switch('g') boolean root) throws WorldEditException, IOException {
|
||||
public void saveBrush(Player player, LocalSession session, String name, @Switch(name='g', desc = "TODO") boolean root) throws WorldEditException, IOException {
|
||||
BrushTool tool = session.getBrushTool(player);
|
||||
if (tool != null) {
|
||||
root |= name.startsWith("../");
|
||||
@@ -135,7 +136,7 @@ public class BrushOptionsCommands extends MethodCommands {
|
||||
" -p <page> prints the requested page\n"
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.list")
|
||||
public void list(Actor actor, CommandContext args, @Switch('p') @Arg(name = "page", desc = "int", def = "1") int page) throws WorldEditException {
|
||||
public void list(Actor actor, CommandContext args, @Switch(name='p', desc = "TODO") @Arg(name = "page", desc = "int", def = "1") int page) throws WorldEditException {
|
||||
String baseCmd = Commands.getAlias(BrushCommands.class, "brush") + " " + Commands.getAlias(BrushOptionsCommands.class, "loadbrush");
|
||||
File dir = MainUtil.getFile(Fawe.imp().getDirectory(), "brushes");
|
||||
UtilityCommands.list(dir, actor, args, page, null, true, baseCmd);
|
||||
@@ -309,7 +310,7 @@ public class BrushOptionsCommands extends MethodCommands {
|
||||
max = -1
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.scroll")
|
||||
public void scroll(Player player, EditSession editSession, LocalSession session, @Optional @Switch('h') boolean offHand, CommandContext args) throws WorldEditException {
|
||||
public void scroll(Player player, EditSession editSession, LocalSession session, @Optional @Switch(name='h', desc = "TODO") boolean offHand, CommandContext args) throws WorldEditException {
|
||||
BrushTool bt = session.getBrushTool(player, false);
|
||||
if (bt == null) {
|
||||
BBC.BRUSH_NONE.send(player);
|
||||
@@ -335,7 +336,7 @@ public class BrushOptionsCommands extends MethodCommands {
|
||||
max = -1
|
||||
)
|
||||
@CommandPermissions({"worldedit.brush.options.mask", "worldedit.mask.brush"})
|
||||
public void mask(Player player, LocalSession session, EditSession editSession, @Optional @Switch('h') boolean offHand, CommandContext context) throws WorldEditException {
|
||||
public void mask(Player player, LocalSession session, EditSession editSession, @Optional @Switch(name='h', desc = "TODO") boolean offHand, CommandContext context) throws WorldEditException {
|
||||
BrushTool tool = session.getBrushTool(player, false);
|
||||
if (tool == null) {
|
||||
player.print(BBC.BRUSH_NONE.f());
|
||||
@@ -367,7 +368,7 @@ public class BrushOptionsCommands extends MethodCommands {
|
||||
max = -1
|
||||
)
|
||||
@CommandPermissions({"worldedit.brush.options.mask", "worldedit.mask.brush"})
|
||||
public void smask(Player player, LocalSession session, EditSession editSession, @Optional @Switch('h') boolean offHand, CommandContext context) throws WorldEditException {
|
||||
public void smask(Player player, LocalSession session, EditSession editSession, @Optional @Switch(name='h', desc = "TODO") boolean offHand, CommandContext context) throws WorldEditException {
|
||||
BrushTool tool = session.getBrushTool(player, false);
|
||||
if (tool == null) {
|
||||
player.print(BBC.BRUSH_NONE.f());
|
||||
@@ -397,7 +398,7 @@ public class BrushOptionsCommands extends MethodCommands {
|
||||
max = -1
|
||||
)
|
||||
@CommandPermissions({"worldedit.brush.options.transform", "worldedit.transform.brush"})
|
||||
public void transform(Player player, LocalSession session, EditSession editSession, @Optional @Switch('h') boolean offHand, CommandContext context) throws WorldEditException {
|
||||
public void transform(Player player, LocalSession session, EditSession editSession, @Optional @Switch(name='h', desc = "TODO") boolean offHand, CommandContext context) throws WorldEditException {
|
||||
BrushTool tool = session.getBrushTool(player, false);
|
||||
if (tool == null) {
|
||||
player.print(BBC.BRUSH_NONE.f());
|
||||
@@ -427,7 +428,7 @@ public class BrushOptionsCommands extends MethodCommands {
|
||||
desc = "Set the brush material"
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.options.material")
|
||||
public void material(Player player, EditSession editSession, LocalSession session, Pattern pattern, @Switch('h') boolean offHand, CommandContext context) throws WorldEditException {
|
||||
public void material(Player player, EditSession editSession, LocalSession session, Pattern pattern, @Switch(name='h', desc = "TODO") boolean offHand, CommandContext context) throws WorldEditException {
|
||||
BrushTool tool = session.getBrushTool(player, false);
|
||||
if (tool == null) {
|
||||
player.print(BBC.BRUSH_NONE.f());
|
||||
@@ -466,7 +467,7 @@ public class BrushOptionsCommands extends MethodCommands {
|
||||
desc = "Set the brush size"
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.options.size")
|
||||
public void size(Player player, LocalSession session, CommandContext args, @Switch('h') boolean offHand) throws WorldEditException {
|
||||
public void size(Player player, LocalSession session, CommandContext args, @Switch(name='h', desc = "TODO") boolean offHand) throws WorldEditException {
|
||||
int radius = args.getInteger(0);
|
||||
worldEdit.checkMaxBrushRadius(radius);
|
||||
BrushTool tool = session.getBrushTool(player, false);
|
||||
|
@@ -45,7 +45,7 @@ import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.util.Location;
|
||||
import com.sk89q.worldedit.util.command.binding.Range;
|
||||
import com.sk89q.worldedit.util.command.binding.Switch;
|
||||
import org.enginehub.piston.annotation.param.Switch;
|
||||
import com.sk89q.worldedit.util.command.parametric.Optional;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import java.io.File;
|
||||
@@ -79,7 +79,7 @@ public class HistoryCommands extends MethodCommands {
|
||||
" - Import from disk: /frb #import"
|
||||
)
|
||||
@CommandPermissions("worldedit.history.rollback")
|
||||
public void faweRollback(final Player player, LocalSession session, final String user, @Optional("0") @Range(min = 0) int radius, @Arg(name = "time", desc = "String", def = "0") String time, @Switch('r') boolean restore) throws WorldEditException {
|
||||
public void faweRollback(final Player player, LocalSession session, final String user, @Optional("0") @Range(min = 0) int radius, @Arg(name = "time", desc = "String", def = "0") String time, @Switch(name='r', desc = "TODO") boolean restore) throws WorldEditException {
|
||||
if (!Settings.IMP.HISTORY.USE_DATABASE) {
|
||||
BBC.SETTING_DISABLE.send(player, "history.use-database (Import with /frb #import )");
|
||||
return;
|
||||
|
@@ -16,7 +16,7 @@ import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.math.Vector3;
|
||||
import com.sk89q.worldedit.regions.shape.WorldEditExpressionEnvironment;
|
||||
import com.sk89q.worldedit.session.request.RequestSelection;
|
||||
import com.sk89q.worldedit.util.command.binding.Switch;
|
||||
import org.enginehub.piston.annotation.param.Switch;
|
||||
import com.sk89q.worldedit.util.command.parametric.Optional;
|
||||
import com.sk89q.worldedit.world.biome.BiomeType;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
@@ -257,7 +257,7 @@ public class MaskCommands extends MethodCommands {
|
||||
"Example: /[3][20]\n" +
|
||||
"Explanation: Allows any block where the adjacent block is between 3 and 20 blocks below"
|
||||
)
|
||||
public Mask angle(Extent extent, String min, String max, @Switch('o') boolean overlay, @Arg(name = "distance", desc = "int", def = "1") int distance) throws ExpressionException {
|
||||
public Mask angle(Extent extent, String min, String max, @Switch(name='o', desc = "TODO") boolean overlay, @Arg(name = "distance", desc = "int", def = "1") int distance) throws ExpressionException {
|
||||
double y1, y2;
|
||||
boolean override;
|
||||
if (max.endsWith("d")) {
|
||||
@@ -282,7 +282,7 @@ public class MaskCommands extends MethodCommands {
|
||||
"Explanation: Restrict near where the angle changes between 0-45 degrees within 5 blocks\n" +
|
||||
"Note: Use negatives for decreasing slope"
|
||||
)
|
||||
public Mask roc(Extent extent, String min, String max, @Switch('o') boolean overlay, @Arg(name = "distance", desc = "int", def = "4") int distance) throws ExpressionException {
|
||||
public Mask roc(Extent extent, String min, String max, @Switch(name='o', desc = "TODO") boolean overlay, @Arg(name = "distance", desc = "int", def = "4") int distance) throws ExpressionException {
|
||||
double y1, y2;
|
||||
boolean override;
|
||||
if (max.endsWith("d")) {
|
||||
@@ -307,7 +307,7 @@ public class MaskCommands extends MethodCommands {
|
||||
"Explanation: Restrict to near 45 degrees of local maxima\n" +
|
||||
"Note: Use negatives for local minima"
|
||||
)
|
||||
public Mask extrema(Extent extent, String min, String max, @Switch('o') boolean overlay, @Arg(name = "distance", desc = "int", def = "4") int distance) throws ExpressionException {
|
||||
public Mask extrema(Extent extent, String min, String max, @Switch(name='o', desc = "TODO") boolean overlay, @Arg(name = "distance", desc = "int", def = "4") int distance) throws ExpressionException {
|
||||
double y1, y2;
|
||||
boolean override;
|
||||
if (max.endsWith("d")) {
|
||||
|
@@ -412,7 +412,7 @@ public class RegionCommands {
|
||||
)
|
||||
@CommandPermissions("worldedit.region.smooth")
|
||||
@Logging(REGION)
|
||||
public void smooth(FawePlayer player, EditSession editSession, @Selection Region region, @Arg(name = "iterations", desc = "int", def = "1") int iterations, @Arg(name = "mask", desc = "Mask", def = "") Mask mask, @Switch('s') boolean snow, CommandContext context) throws WorldEditException {
|
||||
public void smooth(FawePlayer player, EditSession editSession, @Selection Region region, @Arg(name = "iterations", desc = "int", def = "1") int iterations, @Arg(name = "mask", desc = "Mask", def = "") Mask mask, @Switch(name='s', desc = "TODO") boolean snow, CommandContext context) throws WorldEditException {
|
||||
BlockVector3 min = region.getMinimumPoint();
|
||||
BlockVector3 max = region.getMaximumPoint();
|
||||
long volume = (((long) max.getX() - (long) min.getX() + 1) * ((long) max.getY() - (long) min.getY() + 1) * ((long) max.getZ() - (long) min.getZ() + 1));
|
||||
@@ -491,10 +491,10 @@ public class RegionCommands {
|
||||
boolean moveSelection,
|
||||
@Switch(name = 'a', desc = "Ignore air blocks")
|
||||
boolean ignoreAirBlocks
|
||||
@Switch('b') boolean copyBiomes,
|
||||
@Switch(name='b', desc = "TODO") boolean copyBiomes,
|
||||
|
||||
@Switch('e') boolean skipEntities,
|
||||
@Switch('a') boolean skipAir,
|
||||
@Switch(name='e', desc = "TODO") boolean skipEntities,
|
||||
@Switch(name='a', desc = "TODO") boolean skipAir,
|
||||
CommandContext context) throws WorldEditException {
|
||||
player.checkConfirmationRegion(() -> {
|
||||
int affected = editSession.moveRegion(region, direction, count, !skipAir, !skipEntities, copyBiomes, replace);
|
||||
@@ -525,7 +525,7 @@ public class RegionCommands {
|
||||
public void fall(FawePlayer player, EditSession editSession, LocalSession session,
|
||||
@Selection Region region,
|
||||
@Arg(name = "replace", desc = "BlockStateHolder", def = "air") BlockStateHolder replace,
|
||||
@Switch('m') boolean notFullHeight,
|
||||
@Switch(name='m', desc = "TODO") boolean notFullHeight,
|
||||
CommandContext context) throws WorldEditException {
|
||||
player.checkConfirmationRegion(() -> {
|
||||
int affected = editSession.fall(region, !notFullHeight, replace);
|
||||
@@ -551,7 +551,7 @@ public class RegionCommands {
|
||||
@Switch(name = 'b', desc = "//TODO") boolean copyBiomes,
|
||||
@Switch(name = 'e', desc = "//TODO") boolean skipEntities,
|
||||
@Switch(name = 'a', desc = "Ignore air blocks")
|
||||
boolean ignoreAirBlocks, @Switch('m') Mask sourceMask, CommandContext context) throws WorldEditException {
|
||||
boolean ignoreAirBlocks, @Switch(name='m', desc = "TODO") Mask sourceMask, CommandContext context) throws WorldEditException {
|
||||
player.checkConfirmationStack(() -> {
|
||||
if (sourceMask != null) {
|
||||
editSession.addSourceMask(sourceMask);
|
||||
|
@@ -557,7 +557,7 @@ public class SchematicCommands {
|
||||
" -f <format> restricts by format\n"
|
||||
)
|
||||
@CommandPermissions("worldedit.schematic.show")
|
||||
public void show(Player player, CommandContext args, @Switch('f') String formatName) {
|
||||
public void show(Player player, CommandContext args, @Switch(name='f', desc = "TODO") String formatName) {
|
||||
FawePlayer fp = FawePlayer.wrap(player);
|
||||
if (args.argsLength() == 0) {
|
||||
if (fp.getSession().getVirtualWorld() != null) fp.setVirtualWorld(null);
|
||||
|
@@ -20,7 +20,7 @@
|
||||
package com.sk89q.worldedit.util.command.parametric;
|
||||
|
||||
import com.sk89q.minecraft.util.commands.CommandLocals;
|
||||
import com.sk89q.worldedit.util.command.binding.Switch;
|
||||
import org.enginehub.piston.annotation.param.Switch;
|
||||
|
||||
/**
|
||||
* Determines the type of binding.
|
||||
|
@@ -38,7 +38,7 @@ import com.sk89q.worldedit.util.command.NullCompleter;
|
||||
import com.sk89q.worldedit.util.command.ProcessedCallable;
|
||||
import com.sk89q.worldedit.util.command.binding.PrimitiveBindings;
|
||||
import com.sk89q.worldedit.util.command.binding.StandardBindings;
|
||||
import com.sk89q.worldedit.util.command.binding.Switch;
|
||||
import org.enginehub.piston.annotation.param.Switch;
|
||||
import com.thoughtworks.paranamer.Paranamer;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Type;
|
||||
|
@@ -33,7 +33,7 @@ import com.sk89q.worldedit.util.command.MissingParameterException;
|
||||
import com.sk89q.worldedit.util.command.Parameter;
|
||||
import com.sk89q.worldedit.util.command.SimpleDescription;
|
||||
import com.sk89q.worldedit.util.command.UnconsumedParameterException;
|
||||
import com.sk89q.worldedit.util.command.binding.Switch;
|
||||
import org.enginehub.piston.annotation.param.Switch;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
Reference in New Issue
Block a user