3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-08 04:20:06 +01:00

fix some Command annotations

Dieser Commit ist enthalten in:
Jesse Boyd 2019-07-17 15:43:18 +10:00
Ursprung 0e54f196fc
Commit cedb261313
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F
16 geänderte Dateien mit 524 neuen und 739 gelöschten Zeilen

Datei anzeigen

@ -65,7 +65,7 @@ processResources {
version: "${project.parent.version}",
name: project.parent.name,
commit: "${git.head().abbreviatedId}",
date: "${git.head().getDate().format("yy.MM.dd")}",
date: "${git.head().getDate().format("yy.MM.dd")}"
)
}
}

Datei anzeigen

@ -141,12 +141,10 @@ public class AnvilCommands {
}
@Command(
aliases = {"replaceall", "rea", "repall"},
usage = "<folder> [from-block] <to-block>",
name = "replaceall",
aliases = {"rea", "repall"},
desc = "Replace all blocks in the selection with another",
help = "Replace all blocks in the selection with another\n" +
"The -d flag disabled wildcard data matching\n",
flags = "df"
descFooter = "The -d flag disabled wildcard data matching\n"
)
@CommandPermissions("worldedit.anvil.replaceall")
public void replaceAll(Player player, String folder, @Optional String from, String to, @Switch('d') boolean useData) throws WorldEditException {
@ -166,9 +164,8 @@ public class AnvilCommands {
}
@Command(
aliases = {"remapall"},
usage = "<folder>",
help = "Remap the world between MCPE/PC values",
name = "remapall",
descFooter = "Remap the world between MCPE/PC values",
desc = "Remap the world between MCPE/PC values"
)
@CommandPermissions("worldedit.anvil.remapall")
@ -185,10 +182,10 @@ public class AnvilCommands {
@Command(
aliases = {"deleteallunvisited", "delunvisited" },
usage = "<folder> <age-ticks> [file-age=60000]",
name = "deleteallunvisited",
aliases = {"delunvisited" },
desc = "Delete all chunks which haven't been occupied",
help = "Delete all chunks which haven't been occupied for `age-ticks` (20t = 1s) and \n" +
descFooter = "occupied for `age-ticks` (20t = 1s) and \n" +
"Have not been accessed since `file-duration` (ms) after creation and\n" +
"Have not been used in the past `chunk-inactivity` (ms)" +
"The auto-save interval is the recommended value for `file-duration` and `chunk-inactivity`"
@ -201,15 +198,14 @@ public class AnvilCommands {
}
@Command(
aliases = {"deleteallunclaimed", "delallunclaimed" },
usage = "<age-ticks> [file-age=60000]",
desc = "(Supports: WG, P2, GP) Delete all chunks which haven't been occupied AND claimed",
help = "(Supports: WG, P2, GP) Delete all chunks which aren't claimed AND haven't been occupied for `age-ticks` (20t = 1s) and \n" +
name = "deleteallunclaimed",
aliases = {"delallunclaimed" },
desc = "Delete all chunks which haven't been occupied",
descFooter = "Supports: WG, P2, GP:\n" +
"Delete all chunks which aren't claimed AND haven't been occupied for `age-ticks` (20t = 1s) and \n" +
"Have not been accessed since `file-duration` (ms) after creation and\n" +
"Have not been used in the past `chunk-inactivity` (ms)" +
"The auto-save interval is the recommended value for `file-duration` and `chunk-inactivity`",
min = 1,
max = 3
"The auto-save interval is the recommended value for `file-duration` and `chunk-inactivity`"
)
@CommandPermissions("worldedit.anvil.deleteallunclaimed")
public void deleteAllUnclaimed(Player player, int inhabitedTicks, @Optional("60000") int fileDurationMillis, @Switch('d') boolean debug) throws WorldEditException {
@ -222,14 +218,13 @@ public class AnvilCommands {
@Command(
name = "deleteunclaimed",
usage = "<age-ticks> [file-age=60000]",
desc = "(Supports: WG, P2, GP) Delete all chunks which haven't been occupied AND claimed",
help = "(Supports: WG, P2, GP) Delete all chunks which aren't claimed AND haven't been occupied for `age-ticks` (20t = 1s) and \n" +
desc = "Delete all chunks which haven't been occupied",
descFooter = "(Supports: WG, P2, GP):\n" +
"Is not claimed\n" +
"Has not been occupied for `age-ticks` (20t = 1s) and \n" +
"Have not been accessed since `file-duration` (ms) after creation and\n" +
"Have not been used in the past `chunk-inactivity` (ms)" +
"The auto-save interval is the recommended value for `file-duration` and `chunk-inactivity`",
min = 1,
max = 3
"The auto-save interval is the recommended value for `file-duration` and `chunk-inactivity`"
)
@CommandPermissions("worldedit.anvil.deleteunclaimed")
public void deleteUnclaimed(Player player, EditSession editSession, @Selection Region selection, int inhabitedTicks, @Optional("60000") int fileDurationMillis, @Switch('d') boolean debug) throws WorldEditException {
@ -240,11 +235,10 @@ public class AnvilCommands {
}
@Command(
aliases = {"deletealloldregions", "deloldreg" },
usage = "<folder> <time>",
name = "deletealloldregions",
aliases = {"deloldreg" },
desc = "Delete regions which haven't been accessed in a certain amount of time",
help = "Delete regions which haven't been accessed in a certain amount of time\n" +
"You can use seconds (s), minutes (m), hours (h), days (d), weeks (w), years (y)\n" +
descFooter = "You can use seconds (s), minutes (m), hours (h), days (d), weeks (w), years (y)\n" +
"(months are not a unit of time)\n" +
"E.g. 8h5m12s\n"
)
@ -259,8 +253,7 @@ public class AnvilCommands {
@Command(
name = "trimallplots",
desc = "Trim chunks in a Plot World",
help = "Trim chunks in a Plot World\n" +
"Unclaimed chunks will be deleted\n" +
descFooter = "Unclaimed chunks will be deleted\n" +
"Unmodified chunks will be deleted\n" +
"Use -v to also delete unvisited chunks\n"
)
@ -310,10 +303,9 @@ public class AnvilCommands {
}
@Command(
aliases = {"replaceallpattern", "reap", "repallpat"},
usage = "<folder> [from-block] <to-pattern>",
desc = "Replace all blocks in the selection with another",
flags = "dm"
name = "replaceallpattern",
aliases = {"reap", "repallpat"},
desc = "Replace all blocks in the selection with another"
)
@CommandPermissions("worldedit.anvil.replaceall")
public void replaceAllPattern(Player player, String folder, @Optional String from, final Pattern to, @Switch('d') boolean useData, @Switch('m') boolean useMap) throws WorldEditException {
@ -340,10 +332,8 @@ public class AnvilCommands {
}
//
@Command(
aliases = {"countall"},
usage = "<folder> [hasSky] <id>",
desc = "Count all blocks in a world",
flags = "d"
name = "countall",
desc = "Count all blocks in a world"
)
@CommandPermissions("worldedit.anvil.countall")
public void countAll(Player player, EditSession editSession, String folder, String arg, @Switch('d') boolean useData) throws WorldEditException {
@ -363,7 +353,8 @@ public class AnvilCommands {
}
@Command(
aliases = {"clear", "unset"},
name = "clear",
aliases = {"unset"},
desc = "Clear the chunks in a selection (delete without defrag)"
)
@CommandPermissions("worldedit.anvil.clear")
@ -413,12 +404,8 @@ public class AnvilCommands {
}
@Command(
aliases = {"count"},
usage = "<ids>",
desc = "Count blocks in a selection",
flags = "d",
min = 1,
max = 2
name = "count",
desc = "Count blocks in a selection"
)
@CommandPermissions("worldedit.anvil.count")
public void count(Player player, EditSession editSession, @Selection Region selection, String arg, @Switch('d') boolean useData) throws WorldEditException {
@ -438,7 +425,7 @@ public class AnvilCommands {
}
//
@Command(
aliases = {"distr"},
name = "distr",
desc = "Replace all blocks in the selection with another"
)
@CommandPermissions("worldedit.anvil.distr")
@ -515,8 +502,8 @@ public class AnvilCommands {
}
//
@Command(
aliases = {"replace", "r"},
usage = "[from-block] <to-block>",
name = "replace",
aliases = {"r"},
desc = "Replace all blocks in the selection with another"
)
@CommandPermissions("worldedit.anvil.replace")
@ -536,8 +523,8 @@ public class AnvilCommands {
}
//
@Command(
aliases = {"replacepattern", "preplace", "rp"},
usage = "[from-mask] <to-pattern>",
name = "replacepattern",
aliases = {"preplace", "rp"},
desc = "Replace all blocks in the selection with a pattern"
)
@CommandPermissions("worldedit.anvil.replace")
@ -568,8 +555,7 @@ public class AnvilCommands {
}
@Command(
aliases = {"set"},
usage = "<to-pattern>",
name = "set",
desc = "Set all blocks in the selection with a pattern"
)
@CommandPermissions("worldedit.anvil.set")
@ -583,10 +569,9 @@ public class AnvilCommands {
}
@Command(
aliases = {"removelayers"},
usage = "<id>",
name = "removelayers",
desc = "Removes matching chunk layers",
help = "Remove if all the selected layers in a chunk match the provided id"
descFooter = "Only if a chunk matches the provided id"
)
@CommandPermissions("worldedit.anvil.removelayer")
public void removeLayers(Player player, EditSession editSession, @Selection Region selection, int id) throws WorldEditException {
@ -603,7 +588,7 @@ public class AnvilCommands {
@Command(
aliases = {"copy"},
name = "copy",
desc = "Lazily copy chunks to your anvil clipboard"
)
@CommandPermissions("worldedit.anvil.copychunks")
@ -624,12 +609,11 @@ public class AnvilCommands {
}
@Command(
aliases = {"paste"},
name = "paste",
desc = "Paste chunks from your anvil clipboard",
help =
descFooter =
"Paste the chunks from your anvil clipboard.\n" +
"The -c flag will align the paste to the chunks.",
flags = "c"
)
@CommandPermissions("worldedit.anvil.pastechunks")

Datei anzeigen

@ -101,7 +101,7 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"heightmap"},
name = "heightmap",
desc = "Start CFI with a height map as a base"
)
@CommandPermissions("worldedit.anvil.cfi")
@ -291,7 +291,8 @@ public class CFICommands extends MethodCommands {
@Command(
name = "overlay",
aliases = {"overlay", "setoverlay"},
name = "overlay",
aliases = {"setoverlay"},
desc = "Set the overlay block",
descFooter = "Change the block directly above the floor (default: air)\n" +
"e.g. Tallgrass"
@ -307,7 +308,7 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"smooth"},
name = "smooth",
desc = "Smooth the terrain",
descFooter = "Smooth terrain within an image-mask, or worldedit mask\n" +
" - You can use !0 as the mask to smooth everything\n" +
@ -572,7 +573,8 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"baseid", "bedrockid"},
name = "baseid",
aliases = {"bedrockid"},
desc = "Change the block used for the base\ne.g. Bedrock"
)
@CommandPermissions("worldedit.anvil.cfi")
@ -585,7 +587,8 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"worldthickness", "width", "thickness"},
name = "worldthickness",
aliases = {"width", "thickness"},
desc = "Set the thickness of the generated world\n" +
" - A value of 0 is the default and will not modify the height"
)
@ -597,7 +600,8 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"floorthickness", "floorheight", "floorwidth"},
name = "floorthickness",
aliases = {"floorheight", "floorwidth"},
desc = "Set the thickness of the top layer\n" +
" - A value of 0 is the default and will only set the top block"
)
@ -609,7 +613,8 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"update", "refresh", "resend"},
name = "update",
aliases = {"refresh", "resend"},
desc = "Resend the CFI chunks"
)
@CommandPermissions("worldedit.anvil.cfi")
@ -620,7 +625,8 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"tp", "visit", "home"},
name = "tp",
aliases = {"visit", "home"},
desc = "Teleport to the CFI virtual world"
)
@CommandPermissions("worldedit.anvil.cfi")
@ -635,7 +641,8 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"waterheight", "sealevel", "setwaterheight"},
name = "waterheight",
aliases = {"sealevel", "setwaterheight"},
desc = "Set the level water is generated at\n" +
"Set the level water is generated at\n" +
" - By default water is disabled (with a value of 0)"
@ -648,8 +655,8 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"glass", "glasscolor", "setglasscolor"},
usage = "<url>",
name = "glass",
aliases = {"glasscolor", "setglasscolor"},
desc = "Color terrain using glass"
)
// ![79,174,212,5:3,5:4,18,161,20]
@ -663,10 +670,10 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"color", "setcolor", "blockcolor", "blocks"},
usage = "<url> [imageMask|mask]",
name = "color",
aliases = {"setcolor", "blockcolor", "blocks"},
desc = "Set the color with blocks and biomes",
help = "Color the terrain using only blocks\n" +
descFooter = "Color the terrain using only blocks\n" +
"Provide an image, or worldedit mask for the 2nd argument to restrict what areas are colored\n" +
"The -w (disableWhiteOnly) will randomly apply depending on the pixel luminance"
)
@ -683,10 +690,10 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"blockbiomecolor", "setblockandbiomecolor", "blockandbiome"},
usage = "<url> [imageMask|mask]",
name = "blockbiomecolor",
aliases = {"setblockandbiomecolor", "blockandbiome"},
desc = "Set the color with blocks and biomes",
help = "Color the terrain using blocks and biomes.\n" +
descFooter = "Color the terrain using blocks and biomes.\n" +
"Provide an image, or worldedit mask to restrict what areas are colored\n" +
"The -w (disableWhiteOnly) will randomly apply depending on the pixel luminance"
)
@ -700,8 +707,8 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"biomecolor", "setbiomecolor", "biomes"},
usage = "<url> [imageMask|mask]",
name = "biomecolor",
aliases = {"setbiomecolor", "biomes"},
desc = "Color the terrain using biomes.\n" +
"Note: Biome coloring does not change blocks:\n" +
" - If you changed the block to something other than grass you will not see anything."
@ -717,7 +724,8 @@ public class CFICommands extends MethodCommands {
@Command(
aliases = {"coloring", "palette"},
name = "coloring",
aliases = {"palette"},
usage = "",
desc = "Color the world using an image"
)
@ -794,8 +802,7 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"mask"},
usage = "<imageMask|mask>",
name = "mask",
desc = "Select a mask"
)
@CommandPermissions("worldedit.anvil.cfi")
@ -820,8 +827,7 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"pattern"},
usage = "<pattern>",
name = "pattern",
desc = "Select a pattern"
)
@CommandPermissions("worldedit.anvil.cfi")
@ -845,7 +851,7 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"download"},
name = "download",
desc = "Download the current image"
)
@CommandPermissions("worldedit.anvil.cfi")
@ -861,8 +867,7 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"image"},
usage = "<image>",
name = "image",
desc = "Select an image"
)
@CommandPermissions("worldedit.anvil.cfi")
@ -895,7 +900,7 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"populate"},
name = "populate",
usage = "",
desc = ""
)
@ -912,7 +917,8 @@ public class CFICommands extends MethodCommands {
}
@Command(
aliases = {"component", "components"},
name = "component",
aliases = {"components"},
usage = "",
desc = "Components menu"
)

Datei anzeigen

@ -14,7 +14,6 @@ import com.github.intellectualsites.plotsquared.plot.util.WorldUtil;
command = "trimchunks",
permission = "plots.admin",
description = "Delete unmodified portions of your plotworld",
usage = "/plot trimchunks <world> <boolean-delete-unowned>",
requiredType = RequiredType.PLAYER,
category = CommandCategory.ADMINISTRATION)
public class FaweTrim extends SubCommand {

Datei anzeigen

@ -60,6 +60,8 @@ import com.boydti.fawe.object.mask.IdMask;
import com.boydti.fawe.util.ColorUtil;
import com.boydti.fawe.util.MathMan;
import com.boydti.fawe.util.image.ImageUtil;
import com.sk89q.minecraft.util.commands.CommandContext;
import com.sk89q.minecraft.util.commands.CommandLocals;
import com.sk89q.minecraft.util.commands.Step;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.EmptyClipboardException;
@ -98,6 +100,7 @@ import com.sk89q.worldedit.util.command.CallableProcessor;
import com.sk89q.worldedit.util.command.CommandCallable;
import com.sk89q.worldedit.util.command.InvalidUsageException;
import com.sk89q.worldedit.util.command.parametric.AParametricCallable;
import com.sk89q.worldedit.util.command.parametric.Optional;
import com.sk89q.worldedit.util.command.parametric.ParameterException;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockType;
@ -137,9 +140,10 @@ public class BrushCommands {
}
@Command(
aliases = {"blendball", "bb", "blend"},
name = "blendball",
aliases = {"bb", "blend"},
desc = "Smooths and blends terrain",
help = "Smooths and blends terrain\n" +
descFooter = "Smooths and blends terrain\n" +
"Pic: https://i.imgur.com/cNUQUkj.png -> https://i.imgur.com/hFOFsNf.png"
)
@CommandPermissions("worldedit.brush.blendball")
@ -299,10 +303,10 @@ public class BrushCommands {
}
@Command(
aliases = {"recursive", "recurse", "r"},
usage = "<pattern-to> [radius=5]",
name = "recursive",
aliases = {"recurse", "r"},
desc = "Set all connected blocks",
help = "Set all connected blocks\n" +
descFooter = "Set all connected blocks\n" +
"The -d flag Will apply in depth first order\n" +
"Note: Set a mask to recurse along specific blocks"
)
@ -343,11 +347,10 @@ public class BrushCommands {
}
@Command(
aliases = {"line", "l"},
usage = "<pattern> [radius=0]",
flags = "hsf",
name = "line",
aliases = {"l"},
desc = "Create lines",
help = "Create lines.\n" +
descFooter = "Create lines.\n" +
"The -h flag creates only a shell\n" +
"The -s flag selects the clicked point after drawing\n" +
"The -f flag creates a flat line"
@ -389,10 +392,10 @@ public class BrushCommands {
}
@Command(
aliases = {"spline", "spl", "curve"},
usage = "<pattern>",
name = "spline",
aliases = {"spl", "curve"},
desc = "Join multiple objects together in a curve",
help = "Click to select some objects,click the same block twice to connect the objects.\n" +
descFooter = "Click to select some objects,click the same block twice to connect the objects.\n" +
"Insufficient brush radius, or clicking the the wrong spot will result in undesired shapes. The shapes must be simple lines or loops.\n" +
"Pic1: http://i.imgur.com/CeRYAoV.jpg -> http://i.imgur.com/jtM0jA4.png\n" +
"Pic2: http://i.imgur.com/bUeyc72.png -> http://i.imgur.com/tg6MkcF.png" +
@ -437,10 +440,10 @@ public class BrushCommands {
// Adapted from: https://github.com/Rafessor/VaeronTools
@Command(
aliases = {"sweep", "sw", "vaesweep"},
usage = "[copies=-1]",
name = "sweep",
aliases = {"sw", "vaesweep"},
desc = "Sweep your clipboard content along a curve",
help = "Sweeps your clipboard content along a curve.\n" +
descFooter = "Sweeps your clipboard content along a curve.\n" +
"Define a curve by selecting the individual points with a brush\n" +
"Set [copies] to a value > 0 if you want to have your selection pasted a limited amount of times equally spaced on the curve"
)
@ -479,10 +482,10 @@ public class BrushCommands {
}
@Command(
aliases = {"catenary", "cat", "gravityline", "saggedline"},
usage = "<pattern> [lengthFactor=1.2] [size=0]",
name = "catenary",
aliases = {"cat", "gravityline", "saggedline"},
desc = "Create a hanging line between two points",
help = "Create a hanging line between two points.\n" +
descFooter = "Create a hanging line between two points.\n" +
"The lengthFactor controls how long the line is\n" +
"The -h flag creates only a shell\n" +
"The -s flag selects the clicked point after drawing\n" +
@ -525,10 +528,10 @@ public class BrushCommands {
}
@Command(
aliases = {"sspl", "sspline", "surfacespline"},
usage = "<pattern> [size=0] [tension=0] [bias=0] [continuity=0] [quality=10]",
name = "sspl",
aliases = {"sspline", "surfacespline"},
desc = "Draws a spline (curved line) on the surface",
help = "Create a spline on the surface\n" +
descFooter = "Create a spline on the surface\n" +
"Video: https://www.youtube.com/watch?v=zSN-2jJxXlM"
)
@CommandPermissions("worldedit.brush.surfacespline") // 0, 0, 0, 10, 0,
@ -569,9 +572,8 @@ public class BrushCommands {
}
@Command(
aliases = {"rock", "blob"},
usage = "<pattern> [radius=10] [roundness=100] [frequency=30] [amplitude=50]",
flags = "h",
name = "rock",
aliases = {"blob"},
desc = "Creates a distorted sphere"
)
@CommandPermissions("worldedit.brush.rock")
@ -675,10 +677,10 @@ public class BrushCommands {
}
@Command(
aliases = {"shatter", "partition", "split"},
usage = "<pattern> [radius=10] [count=10]",
name = "shatter",
aliases = {"partition", "split"},
desc = "Creates random lines to break the terrain into pieces",
help = "Creates uneven lines separating terrain into multiple pieces\n" +
descFooter = "Creates uneven lines separating terrain into multiple pieces\n" +
"Pic: https://i.imgur.com/2xKsZf2.png"
)
@CommandPermissions("worldedit.brush.shatter")
@ -719,13 +721,11 @@ public class BrushCommands {
}
@Command(
aliases = {"stencil"},
usage = "<pattern> [radius=5] [file|#clipboard|imgur=null] [rotation=360] [yscale=1.0]",
name = "stencil",
desc = "Use a height map to paint a surface",
help = "Use a height map to paint any surface.\n" +
descFooter = "Use a height map to paint any surface.\n" +
"The -w flag will only apply at maximum saturation\n" +
"The -r flag will apply random rotation",
min = 1
"The -r flag will apply random rotation"
)
@CommandPermissions("worldedit.brush.stencil")
public BrushSettings stencilBrush(Player player, EditSession editSession, LocalSession session, Pattern fill, @Optional("5") Expression radius, @Optional() final String image, @Optional("0") @Step(90) @Range(min=0, max=360) final int rotation, @Optional("1") final double yscale, @Switch('w') boolean onlyWhite, @Switch('r') boolean randomRotate, CommandContext context) throws WorldEditException, FileNotFoundException, ParameterException {
@ -771,14 +771,12 @@ public class BrushCommands {
}
@Command(
aliases = {"image", "color"},
usage = "<radius> <image> [yscale=1]",
name = "image",
aliases = {"color"},
desc = "Use a height map to paint a surface",
flags = "a",
help = "Use a height map to paint any surface.\n" +
descFooter = "Use a height map to paint any surface.\n" +
"The -a flag will use image alpha\n" +
"The -f blends the image with the existing terrain",
min = 1
"The -f blends the image with the existing terrain"
)
@CommandPermissions("worldedit.brush.stencil")
public BrushSettings imageBrush(Player player, EditSession editSession, LocalSession session, @Optional("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 {
@ -824,13 +822,12 @@ public class BrushCommands {
}
@Command(
aliases = {"surface", "surf"},
usage = "<pattern> [radius=5]",
name = "surface",
aliases = {"surf"},
desc = "Use a height map to paint a surface",
help = "Use a height map to paint any surface.\n" +
descFooter = "Use a height map to paint any surface.\n" +
"The -w flag will only apply at maximum saturation\n" +
"The -r flag will apply random rotation",
min = 1
"The -r flag will apply random rotation"
)
@CommandPermissions("worldedit.brush.surface")
public BrushSettings surfaceBrush(Player player, EditSession editSession, LocalSession session, Pattern fill, @Optional("5") Expression radius, CommandContext context) throws WorldEditException {
@ -868,11 +865,10 @@ public class BrushCommands {
@Command(
name = "scatter",
usage = "<pattern> [radius=5] [points=5] [distance=1]",
desc = "Scatter a pattern on a surface",
help = "Set a number of blocks randomly on a surface each a certain distance apart.\n" +
descFooter = "Set a number of blocks randomly on a surface each a certain distance apart.\n" +
" The -o flag will overlay the block\n" +
"Video: https://youtu.be/RPZIaTbqoZw?t=34s",
"Video: https://youtu.be/RPZIaTbqoZw?t=34s"
)
@CommandPermissions("worldedit.brush.scatter")
public BrushSettings scatterBrush(Player player, EditSession editSession, LocalSession session, Pattern fill, @Optional("5") Expression radius, @Optional("5") double points, @Optional("1") double distance, @Switch('o') boolean overlay, CommandContext context) throws WorldEditException {
@ -914,10 +910,10 @@ public class BrushCommands {
}
@Command(
aliases = {"populateschematic", "populateschem", "popschem", "pschem", "ps"},
usage = "<mask> <file|folder|url> [radius=30] [points=5]",
name = "populateschematic",
aliases = {"populateschem", "popschem", "pschem", "ps"},
desc = "Scatter a schematic on a surface",
help = "Chooses the scatter schematic brush.\n" +
descFooter = "Chooses the scatter schematic brush.\n" +
"The -r flag will apply random rotation"
)
@CommandPermissions("worldedit.brush.populateschematic")
@ -973,9 +969,8 @@ public class BrushCommands {
@Command(
name = "layer",
usage = "<radius> [color|<pattern1> <patern2>...]",
desc = "Replaces terrain with a layer.",
help = "Replaces terrain with a layer.\n" +
descFooter = "Replaces terrain with a layer.\n" +
"Example: /br layer 5 95:1 95:2 35:15 - Places several layers on a surface\n" +
"Pic: https://i.imgur.com/XV0vYoX.png"
)
@ -1037,7 +1032,7 @@ public class BrushCommands {
@Command(
name = "splatter",
desc = "Splatter a pattern on a surface",
help = "Sets a bunch of blocks randomly on a surface.\n" +
descFooter = "Sets a bunch of blocks randomly on a surface.\n" +
"Pic: https://i.imgur.com/hMD29oO.png\n" +
"Example: /br splatter stone,dirt 30 15\n" +
"Note: The seeds define how many splotches there are, recursion defines how large, solid defines whether the pattern is applied per seed, else per block."
@ -1077,10 +1072,10 @@ public class BrushCommands {
}
@Command(
aliases = {"scmd", "scattercmd", "scattercommand", "scommand"},
usage = "<scatter-radius> <points> <cmd-radius=1> <cmd1;cmd2...>",
name = "scmd",
aliases = {"scattercmd", "scattercommand", "scommand"},
desc = "Run commands at random points on a surface",
help =
descFooter =
"Run commands at random points on a surface\n" +
" - The scatter radius is the min distance between each point\n" +
" - Your selection will be expanded to the specified size around each point\n" +
@ -1209,7 +1204,7 @@ public class BrushCommands {
name = "clipboard",
aliases = { "copy" },
desc = "Choose the clipboard brush (Recommended: `/br copypaste`)",
help = "Chooses the clipboard brush.\n" +
descFooter = "Chooses the clipboard brush.\n" +
"The -a flag makes it not paste air.\n" +
"Without the -p flag, the paste will appear centered at the target location. " +
"With the flag, then the paste will appear relative to where you had " +
@ -1409,11 +1404,10 @@ public class BrushCommands {
}
@Command(
aliases = {"height", "heightmap"},
usage = "[radius=5] [file|#clipboard|imgur=null] [rotation=0] [yscale=1.00]",
flags = "h",
name = "height",
aliases = {"heightmap"},
desc = "Raise or lower terrain using a heightmap",
help = "This brush raises and lowers land.\n" +
descFooter = "This brush raises and lowers land.\n" +
" - The `-r` flag enables random off-axis rotation\n" +
" - The `-l` flag will work on snow layers\n" +
" - The `-s` flag disables smoothing\n" +
@ -1426,11 +1420,10 @@ public class BrushCommands {
}
@Command(
aliases = {"cliff", "flatcylinder"},
usage = "[radius=5] [file|#clipboard|imgur=null] [rotation=0] [yscale=1.00]",
flags = "h",
name = "cliff",
aliases = {"flatcylinder"},
desc = "Cliff brush",
help = "This brush flattens terrain and creates cliffs.\n" +
descFooter = "This brush flattens terrain and creates cliffs.\n" +
" - The `-r` flag enables random off-axis rotation\n" +
" - The `-l` flag will work on snow layers\n" +
" - The `-s` flag disables smoothing"
@ -1441,10 +1434,9 @@ public class BrushCommands {
}
@Command(
aliases = {"flatten", "flatmap", "flat"},
usage = "[radius=5] [file|#clipboard|imgur=null] [rotation=0] [yscale=1.00]",
flags = "h",
help = "Flatten brush flattens terrain\n" +
name = "flatten",
aliases = {"flatmap", "flat"},
descFooter = "Flatten brush flattens terrain\n" +
" - The `-r` flag enables random off-axis rotation\n" +
" - The `-l` flag will work on snow layers\n" +
" - The `-s` flag disables smoothing",
@ -1516,10 +1508,10 @@ public class BrushCommands {
@Command(
aliases = {"copypaste", "copy", "paste", "cp", "copypasta"},
usage = "[depth=5]",
name = "copypaste",
aliases = {"copy", "paste", "cp", "copypasta"},
desc = "Copy Paste brush",
help = "Left click the base of an object to copy.\n" +
descFooter = "Left click the base of an object to copy.\n" +
"Right click to paste\n" +
"The -r flag Will apply random rotation on paste\n" +
"The -a flag Will apply auto view based rotation on paste\n" +
@ -1563,10 +1555,10 @@ public class BrushCommands {
}
@Command(
aliases = {"command", "cmd"},
usage = "<radius> [cmd1;cmd2...]",
name = "command",
aliases = {"cmd"},
desc = "Command brush",
help = "Run the commands at the clicked position.\n" +
descFooter = "Run the commands at the clicked position.\n" +
" - Your selection will be expanded to the specified size around each point\n" +
" - Placeholders: {x}, {y}, {z}, {world}, {size}"
)

Datei anzeigen

@ -55,12 +55,11 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"savebrush", "save"},
usage = "[name]",
name = "savebrush",
aliases = {"save"},
desc = "Save your current brush",
help = "Save your current brush\n" +
"use the -g flag to save globally",
min = 1
descFooter = "Save your current brush\n" +
"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 {
@ -93,10 +92,9 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"loadbrush", "load"},
desc = "load a brush",
usage = "[name]",
min = 1
name = "loadbrush",
aliases = {"load"},
desc = "load a brush"
)
@CommandPermissions("worldedit.brush.load")
public void loadBrush(Player player, LocalSession session, String name) throws WorldEditException, IOException {
@ -130,13 +128,10 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"/listbrush"},
name = "/listbrush",
desc = "List saved brushes",
usage = "[mine|<filter>] [page=1]",
min = 0,
max = -1,
flags = "dnp",
help = "List all brushes in the brush directory\n" +
descFooter = "List all brushes in the brush directory\n" +
" -p <page> prints the requested page\n"
)
@CommandPermissions("worldedit.brush.list")
@ -153,11 +148,10 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"none", "/none"},
name = "none",
aliases = {"/none"},
usage = "",
desc = "Unbind a bound tool from your current item",
min = 0,
max = 0
desc = "Unbind a bound tool from your current item"
)
public void none(Player player, LocalSession session, CommandContext args) throws WorldEditException {
session.setTool(player, null);
@ -165,8 +159,8 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"/", ","},
usage = "[on|off]",
name = "/",
aliases = {","},
desc = "Toggle the super pickaxe function"
)
@CommandPermissions("worldedit.superpickaxe")
@ -192,11 +186,9 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"primary"},
usage = "[brush-arguments]",
name = "primary",
desc = "Set the right click brush",
help = "Set the right click brush",
min = 1
descFooter = "Set the right click brush"
)
@CommandPermissions("worldedit.brush.primary")
public void primary(Player player, LocalSession session, CommandContext args) throws WorldEditException {
@ -213,11 +205,9 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"secondary"},
usage = "[brush-arguments]",
name = "secondary",
desc = "Set the left click brush",
help = "Set the left click brush",
min = 1
descFooter = "Set the left click brush"
)
@CommandPermissions("worldedit.brush.secondary")
public void secondary(Player player, LocalSession session, CommandContext args) throws WorldEditException {
@ -234,15 +224,13 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"visualize", "visual", "vis"},
usage = "[mode=0]",
name = "visualize",
aliases = {"visual", "vis"},
desc = "Toggle between different visualization modes",
help = "Toggle between different visualization modes\n" +
descFooter = "Toggle between different visualization modes\n" +
"0 = No visualization\n" +
"1 = Single block at target position\n" +
"2 = Glass showing what blocks will be changed",
min = 0,
max = 1
"2 = Glass showing what blocks will be changed"
)
@CommandPermissions("worldedit.brush.visualize")
public void visual(Player player, LocalSession session, @Range(min = 0, max = 2)int mode) throws WorldEditException {
@ -258,11 +246,9 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"target", "tar"},
usage = "[mode]",
desc = "Toggle between different target modes",
min = 0,
max = 1
name = "target",
aliases = {"tar"},
desc = "Toggle between different target modes"
)
@CommandPermissions("worldedit.brush.target")
public void target(Player player, LocalSession session, @Optional("0") int mode) throws WorldEditException {
@ -278,10 +264,9 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"targetmask", "tarmask", "tm"},
usage = "[mask]",
name = "targetmask",
aliases = {"tarmask", "tm"},
desc = "Set the targeting mask",
min = 1,
max = -1
)
@CommandPermissions("worldedit.brush.targetmask")
@ -302,10 +287,9 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"targetoffset", "to"},
usage = "[mask]",
name = "targetoffset",
aliases = {"to"},
desc = "Set the targeting mask",
min = 1,
max = -1
)
@CommandPermissions("worldedit.brush.targetoffset")
@ -320,10 +304,8 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"scroll"},
usage = "[none|clipboard|mask|pattern|range|size|visual|target|targetoffset]",
name = "scroll",
desc = "Toggle between different target modes",
min = 1,
max = -1
)
@CommandPermissions("worldedit.brush.scroll")
@ -347,10 +329,9 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"mask", "/mask"},
usage = "[mask]",
name = "mask",
aliases = {"/mask"},
desc = "Set the brush destination mask",
min = 0,
max = -1
)
@CommandPermissions({"worldedit.brush.options.mask", "worldedit.mask.brush"})
@ -379,11 +360,10 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"smask", "/smask", "/sourcemask", "sourcemask"},
usage = "[mask]",
name = "smask",
aliases = {"/smask", "/sourcemask", "sourcemask"},
desc = "Set the brush source mask",
help = "Set the brush source mask",
min = 0,
descFooter = "Set the brush source mask",
max = -1
)
@CommandPermissions({"worldedit.brush.options.mask", "worldedit.mask.brush"})
@ -412,10 +392,8 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"transform"},
usage = "[transform]",
name = "transform",
desc = "Set the brush transform",
min = 0,
max = -1
)
@CommandPermissions({"worldedit.brush.options.transform", "worldedit.transform.brush"})
@ -444,11 +422,9 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"mat", "material"},
usage = "[pattern]",
desc = "Set the brush material",
min = 1,
max = 1
name = "mat",
aliases = {"material"},
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 {
@ -470,11 +446,8 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"range"},
usage = "[pattern]",
desc = "Set the brush range",
min = 1,
max = 1
name = "range",
desc = "Set the brush range"
)
@CommandPermissions("worldedit.brush.options.range")
public void range(Player player, LocalSession session, CommandContext args) throws WorldEditException {
@ -489,11 +462,8 @@ public class BrushOptionsCommands extends MethodCommands {
}
@Command(
aliases = {"size"},
usage = "[pattern]",
desc = "Set the brush size",
min = 1,
max = 1
name = "size",
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 {

Datei anzeigen

@ -379,7 +379,7 @@ public class ClipboardCommands {
@Command(
name = "asset",
desc = "Saves your clipboard to the asset web interface",
desc = "Saves your clipboard to the asset web interface"
)
@CommandPermissions({"worldedit.clipboard.asset"})
public void asset(final Player player, final LocalSession session, String category) throws WorldEditException {
@ -479,7 +479,7 @@ public class ClipboardCommands {
@Command(
name = "/place",
desc = "Place the clipboard's contents without applying transformations (e.g. rotate)",
desc = "Place the clipboard's contents without applying transformations (e.g. rotate)"
)
@CommandPermissions("worldedit.clipboard.place")
@Logging(PLACEMENT)

Datei anzeigen

@ -71,8 +71,8 @@ public class HistoryCommands extends MethodCommands {
@Command(
name = "fawerollback",
aliases = {"/frb", "frb", "fawerollback", "/fawerollback", "/rollback"},
usage = "<user=Empire92> <radius=5> <time=3d4h>",
name = "/frb",
aliases = {"frb", "fawerollback", "/fawerollback", "/rollback"},
desc = "Undo a specific edit. " +
" - The time uses s, m, h, d, y.\n" +
" - Import from disk: /frb #import"
@ -199,7 +199,6 @@ public class HistoryCommands extends MethodCommands {
@Command(
name = "fawerestore",
alias = {"/fawerestore", "/frestore"},
usage = "<user=Empire92|*> <radius=5> <time=3d4h>",
desc = "Redo a specific edit. " +
" - The time uses s, m, h, d, y.\n" +
" - Import from disk: /frb #import"

Datei anzeigen

@ -25,7 +25,7 @@ import java.util.function.Predicate;
@Command(aliases = {"masks"},
desc = "Help for the various masks. [More Info](https://git.io/v9r4K)",
help = "Masks determine if a block can be placed\n" +
descFooter = "Masks determine if a block can be placed\n" +
" - Use [brackets] for arguments\n" +
" - Use , to OR multiple\n" +
" - Use & to AND multiple\n" +
@ -38,11 +38,8 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#simplex"},
desc = "Use simplex noise as the mask",
usage = "<scale=10> <min=0> <max=100>",
min = 3,
max = 3
name = "#simplex",
desc = "Use simplex noise as the mask"
)
public Mask simplex(double scale, double min, double max) {
scale = (1d / Math.max(1, scale));
@ -52,18 +49,16 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#light"},
desc = "Restrict to specific light levels",
usage = "<min> <max>",
min = 2,
max = 2
name = "#light",
desc = "Restrict to specific light levels"
)
public Mask light(Extent extent, double min, double max) {
return new LightMask(extent, (int) min, (int) max);
}
@Command(
aliases = {"false", "#false"},
name = "false",
aliases = {"#false"},
desc = "Always false"
)
public Mask falseMask(Extent extent) {
@ -71,7 +66,8 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"true", "#true"},
name = "true",
aliases = {"#true"},
desc = "Always true"
)
public Mask trueMask(Extent extent) {
@ -79,62 +75,48 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#skylight"},
desc = "Restrict to specific sky light levels",
usage = "<min> <max>",
min = 2,
max = 2
name = "#skylight",
desc = "Restrict to specific sky light levels"
)
public Mask skylight(Extent extent, double min, double max) {
return new SkyLightMask(extent, (int) min, (int) max);
}
@Command(
aliases = {"#blocklight", "#emittedlight"},
desc = "Restrict to specific block light levels",
usage = "<min> <max>",
min = 2,
max = 2
name = "#blocklight",
aliases = {"#emittedlight"},
desc = "Restrict to specific block light levels"
)
public Mask blocklight(Extent extent, double min, double max) {
return new BlockLightMask(extent, (int) min, (int) max);
}
@Command(
aliases = {"#opacity"},
desc = "Restrict to specific opacity levels",
usage = "<min> <max>",
min = 2,
max = 2
name = "#opacity",
desc = "Restrict to specific opacity levels"
)
public Mask opacity(Extent extent, double min, double max) {
return new OpacityMask(extent, (int) min, (int) max);
}
@Command(
aliases = {"#brightness"},
desc = "Restrict to specific block brightness",
usage = "<min> <max>",
min = 2,
max = 2
name = "#brightness",
desc = "Restrict to specific block brightness"
)
public Mask brightness(Extent extent, double min, double max) {
return new BrightnessMask(extent, (int) min, (int) max);
}
@Command(
aliases = {"#offset"},
desc = "Offset a mask",
usage = "<dx> <dy> <dz> <mask>",
min = 4,
max = 4
name = "#offset",
desc = "Offset a mask"
)
public Mask offset(double x, double y, double z, Mask mask) {
return new OffsetMask(mask, BlockVector3.at(x, y, z));
}
@Command(
aliases = {"#haslight"},
name = "#haslight",
desc = "Restricts to blocks with light (sky or emitted)"
)
public Mask haslight(Extent extent) {
@ -142,7 +124,7 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#nolight"},
name = "#nolight",
desc = "Restrict to blocks without light (sky or emitted)"
)
public Mask nolight(Extent extent) {
@ -150,7 +132,7 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#existing"},
name = "#existing",
desc = "If there is a non air block"
)
public Mask existing(Extent extent) {
@ -158,7 +140,7 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#solid"},
name = "#solid",
desc = "If there is a solid block"
)
public Mask solid(Extent extent) {
@ -166,7 +148,7 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#liquid"},
name = "#liquid",
desc = "If there is a solid block"
)
public Mask liquid(Extent extent) {
@ -174,7 +156,8 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#dregion", "#dselection", "#dsel"},
name = "#dregion",
aliases = {"#dselection", "#dsel"},
desc = "inside the player's selection"
)
public Mask dregion() {
@ -182,7 +165,8 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#region", "#selection", "#sel"},
name = "#region",
aliases = {"#selection", "#sel"},
desc = "inside the provided selection"
)
public Mask selection(Player player, LocalSession session) throws IncompleteRegionException {
@ -190,7 +174,7 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#xaxis"},
name = "#xaxis",
desc = "Restrict to initial x axis"
)
public Mask xaxis() {
@ -198,7 +182,7 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#yaxis"},
name = "#yaxis",
desc = "Restrict to initial y axis"
)
public Mask yaxis() {
@ -206,7 +190,7 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#zaxis"},
name = "#zaxis",
desc = "Restrict to initial z axis"
)
public Mask zaxis() {
@ -214,7 +198,7 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#id"},
name = "#id",
desc = "Restrict to initial id"
)
public Mask id(Extent extent) {
@ -222,7 +206,7 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#data"},
name = "#data",
desc = "Restrict to initial data"
)
public Mask data(Extent extent) {
@ -230,7 +214,7 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#iddata"},
name = "#iddata",
desc = "Restrict to initial block id and data"
)
public Mask iddata(Extent extent) {
@ -238,7 +222,7 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#air"},
name = "#air",
desc = "Restrict to types of air"
)
public Mask air(Extent extent) {
@ -246,7 +230,7 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#wall"},
name = "#wall",
desc = "Restrict to walls (any block n,e,s,w of air)"
)
public Mask wall(Extent extent) {
@ -255,7 +239,7 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"#surface"},
name = "#surface",
desc = "Restrict to surfaces (any solid block touching air)"
)
public Mask surface(Extent extent) {
@ -263,16 +247,15 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"\\", "/", "#angle", "#\\", "#/"},
name = "\\",
aliases = {"/", "#angle", "#\\", "#/"},
desc = "Restrict to specific terrain angle",
help = "Restrict to specific terrain angle\n" +
descFooter = "Restrict to specific terrain angle\n" +
"The -o flag will only overlay\n" +
"Example: /[0d][45d]\n" +
"Explanation: Allows any block where the adjacent block is between 0 and 45 degrees.\n" +
"Example: /[3][20]\n" +
"Explanation: Allows any block where the adjacent block is between 3 and 20 blocks below",
usage = "<min> <max> [distance=1]",
min = 2
"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, @Optional("1") int distance) throws ExpressionException {
double y1, y2;
@ -290,15 +273,14 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"(", ")", "#roc", "#(", "#)"},
name = "(",
aliases = {")", "#roc", "#(", "#)"},
desc = "Restrict to near specific terrain slope rate of change",
help = "Restrict to near specific terrain slope rate of change\n" +
descFooter = "Restrict to near specific terrain slope rate of change\n" +
"The -o flag will only overlay\n" +
"Example: ([0d][45d][5]\n" +
"Explanation: Restrict near where the angle changes between 0-45 degrees within 5 blocks\n" +
"Note: Use negatives for decreasing slope",
usage = "<min> <max> [distance=4]",
min = 2
"Note: Use negatives for decreasing slope"
)
public Mask roc(Extent extent, String min, String max, @Switch('o') boolean overlay, @Optional("4") int distance) throws ExpressionException {
double y1, y2;
@ -316,16 +298,14 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"^", "#extrema", "#^"},
name = "^",
aliases = {"#extrema", "#^"},
desc = "Restrict to near specific terrain extrema",
help = "Restrict to near specific terrain extrema\n" +
descFooter = "Restrict to near specific terrain extrema\n" +
"The -o flag will only overlay\n" +
"Example: ([0d][45d][5]\n" +
"Explanation: Restrict to near 45 degrees of local maxima\n" +
"Note: Use negatives for local minima",
usage = "<min> <max> [distance=1]",
min = 2,
max = 4
"Note: Use negatives for local minima"
)
public Mask extrema(Extent extent, String min, String max, @Switch('o') boolean overlay, @Optional("4") int distance) throws ExpressionException {
double y1, y2;
@ -343,33 +323,27 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"{", "#{"},
desc = "Restricts blocks to within a specific radius range of the initial block",
usage = "<min> <max>",
min = 2,
max = 2
name = "{",
aliases = {"#{"},
desc = "Restricts blocks to within a specific radius range of the initial block"
)
public Mask radius(double min, double max) throws ExpressionException {
return new RadiusMask((int) min, (int) max);
}
@Command(
aliases = {"|", "#|", "#side"},
desc = "sides with a specific number of other blocks",
usage = "<mask> <min> <max>",
min = 3,
max = 3
name = "|",
aliases = {"#|", "#side"},
desc = "sides with a specific number of other blocks"
)
public Mask wall(Mask mask, double min, double max) throws ExpressionException {
return new WallMask(mask, (int) min, (int) max);
}
@Command(
aliases = {"~", "#~", "#adjacent"},
desc = "Adjacent to a specific number of other blocks",
usage = "<mask> [min=1] [max=8]",
min = 1,
max = 3
name = "~",
aliases = {"#~", "#adjacent"},
desc = "Adjacent to a specific number of other blocks"
)
public Mask adjacent(Mask mask, @Optional("-1") double min, @Optional("-1") double max) throws ExpressionException {
if (min == -1 && max == -1) {
@ -383,11 +357,9 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"<", "#<", "#below"},
desc = "below a specific block",
usage = "<mask>",
min = 1,
max = 1
name = "<",
aliases = {"#<", "#below"},
desc = "below a specific block"
)
public Mask below(Mask mask) throws ExpressionException {
OffsetMask offsetMask = new OffsetMask(mask, BlockVector3.at(0, 1, 0));
@ -395,11 +367,9 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {">", "#>", "#above"},
desc = "above a specific block",
usage = "<mask>",
min = 1,
max = 1
name = ">",
aliases = {"#>", "#above"},
desc = "above a specific block"
)
public Mask above(Mask mask) throws ExpressionException {
OffsetMask offsetMask = new OffsetMask(mask, BlockVector3.at(0, -1, 0));
@ -407,23 +377,19 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"$", "#biome", "#$"},
name = "$",
aliases = {"#biome", "#$"},
desc = "in a specific biome",
help = "in a specific biome. For a list of biomes use //biomelist",
usage = "<biome>",
min = 1,
max = 1
descFooter = "in a specific biome. For a list of biomes use //biomelist"
)
public Mask biome(Extent extent, BiomeType biome) throws ExpressionException {
return new BiomeMask(extent, biome);
}
@Command(
aliases = {"%", "#%", "#percent"},
desc = "percentage chance",
usage = "<chance>",
min = 1,
max = 1
name = "%",
aliases = {"#%", "#percent"},
desc = "percentage chance"
)
public Mask random(double chance) throws ExpressionException {
chance = chance / 100;
@ -431,11 +397,9 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"=", "#=", "#expression"},
desc = "expression mask",
usage = "<expression>",
min = 1,
max = 1
name = "=",
aliases = {"#=", "#expression"},
desc = "expression mask"
)
public Mask expression(Extent extent, String input) throws ExpressionException {
Expression exp = Expression.compile(input, "x", "y", "z");
@ -445,11 +409,9 @@ public class MaskCommands extends MethodCommands {
}
@Command(
aliases = {"!", "#not", "#negate", "#!"},
desc = "Negate another mask",
usage = "<mask>",
min = 1,
max = 1
name = "!",
aliases = {"#not", "#negate", "#!"},
desc = "Negate another mask"
)
public Mask expression(Mask mask) throws ExpressionException {
return Masks.negate(mask);

Datei anzeigen

@ -54,7 +54,8 @@ public class OptionsCommands {
}
@Command(
aliases = {"/tips", "tips"},
name = "/tips",
aliases = {"tips"},
desc = "Toggle FAWE tips"
)
@CommandPermissions("fawe.tips")
@ -68,11 +69,8 @@ public class OptionsCommands {
}
@Command(
aliases = {"/fast"},
usage = "[on|off]",
desc = "Toggles FAWE undo",
min = 0,
max = 1
name = "/fast",
desc = "Toggles FAWE undo"
)
@CommandPermissions("worldedit.fast")
public void fast(Player player, LocalSession session, CommandContext args) throws WorldEditException {
@ -98,11 +96,10 @@ public class OptionsCommands {
}
@Command(
aliases = {"/gtexture", "gtexture"},
usage = "[mask|#clipboard|complexity] [randomization=true]",
help = "The global destination mask applies to all edits you do and masks based on the destination blocks (i.e. the blocks in the world).",
name = "/gtexture",
aliases = {"gtexture"},
descFooter = "The global destination mask applies to all edits you do and masks based on the destination blocks (i.e. the blocks in the world).",
desc = "Set the global mask",
min = 0,
max = -1
)
@CommandPermissions("worldedit.global-texture")
@ -158,11 +155,10 @@ public class OptionsCommands {
}
@Command(
aliases = {"/gmask", "gmask", "globalmask", "/globalmask"},
usage = "[mask]",
help = "The global destination mask applies to all edits you do and masks based on the destination blocks (i.e. the blocks in the world).",
name = "/gmask",
aliases = {"gmask", "globalmask", "/globalmask"},
descFooter = "The global destination mask applies to all edits you do and masks based on the destination blocks (i.e. the blocks in the world).",
desc = "Set the global mask",
min = 0,
max = -1
)
@CommandPermissions({"worldedit.global-mask", "worldedit.mask.global"})
@ -183,11 +179,10 @@ public class OptionsCommands {
}
@Command(
aliases = {"/gsmask", "gsmask", "globalsourcemask", "/globalsourcemask"},
usage = "[mask]",
name = "/gsmask",
aliases = {"gsmask", "globalsourcemask", "/globalsourcemask"},
desc = "Set the global source mask",
help = "The global source mask applies to all edits you do and masks based on the source blocks (e.g. the blocks in your clipboard)",
min = 0,
descFooter = "The global source mask applies to all edits you do and masks based on the source blocks (e.g. the blocks in your clipboard)",
max = -1
)
@CommandPermissions({"worldedit.global-mask", "worldedit.mask.global"})
@ -208,10 +203,9 @@ public class OptionsCommands {
}
@Command(
aliases = {"/gtransform", "gtransform"},
usage = "[transform]",
name = "/gtransform",
aliases = {"gtransform"},
desc = "Set the global transform",
min = 0,
max = -1
)
@CommandPermissions({"worldedit.global-transform", "worldedit.transform.global"})
@ -232,11 +226,10 @@ public class OptionsCommands {
}
@Command(
aliases = {"/toggleplace", "toggleplace"},
name = "/toggleplace",
aliases = {"toggleplace"},
usage = "",
desc = "Switch between your position and pos1 for placement",
min = 0,
max = 0
desc = "Switch between your position and pos1 for placement"
)
public void togglePlace(Player player, LocalSession session, CommandContext args) throws WorldEditException {
@ -248,11 +241,8 @@ public class OptionsCommands {
}
@Command(
aliases = { "/timeout" },
usage = "[time]",
desc = "Modify evaluation timeout time.",
min = 0,
max = 1
name = "/timeout",
desc = "Modify evaluation timeout time."
)
@CommandPermissions("worldedit.timeout")
public void timeout(Player player, LocalSession session, CommandContext args) throws WorldEditException {
@ -278,11 +268,8 @@ public class OptionsCommands {
}
@Command(
aliases = { "/drawsel" },
usage = "[on|off]",
desc = "Toggle drawing the current selection",
min = 0,
max = 1
name = "/drawsel",
desc = "Toggle drawing the current selection"
)
@CommandPermissions("worldedit.drawsel")
public void drawSelection(Player player, LocalSession session, CommandContext args) throws WorldEditException {
@ -313,17 +300,14 @@ public class OptionsCommands {
}
@Command(
aliases = {"/searchitem", "/l", "/search", "searchitem"},
usage = "<query>",
flags = "bi",
name = "/searchitem",
aliases = {"/l", "/search", "searchitem"},
desc = "Search for an item",
help =
descFooter =
"Searches for an item.\n" +
"Flags:\n" +
" -b only search for blocks\n" +
" -i only search for items",
min = 1,
max = 1
" -i only search for items"
)
@CommandPermissions("worldedit.searchitem")
public void searchItem(Actor actor, CommandContext args) throws WorldEditException {

Datei anzeigen

@ -29,6 +29,8 @@ import com.sk89q.worldedit.session.ClipboardHolder;
import com.sk89q.worldedit.util.command.binding.Range;
import com.sk89q.worldedit.util.command.parametric.Optional;
import com.sk89q.worldedit.world.biome.BiomeType;
import org.enginehub.piston.annotation.param.Arg;
import java.awt.Color;
import java.io.IOException;
import java.util.Collections;
@ -37,7 +39,7 @@ import java.util.Set;
@Command(aliases = {"patterns"},
desc = "Help for the various patterns. [More Info](https://git.io/vSPmA)",
help = "Patterns determine what blocks are placed\n" +
descFooter = "Patterns determine what blocks are placed\n" +
" - Use [brackets] for arguments\n" +
" - Use , to OR multiple\n" +
"e.g. #surfacespread[10][#existing],andesite\n" +
@ -49,7 +51,8 @@ public class PatternCommands extends MethodCommands {
}
@Command(
aliases = {"#existing", "#*", "*", ".*"},
name = "#existing",
aliases = {"#*", "*", ".*"},
desc = "Use the block that is already there",
usage = "[properties]"
)
@ -59,7 +62,8 @@ public class PatternCommands extends MethodCommands {
}
@Command(
aliases = {"#clipboard", "#copy"},
name = "#clipboard",
aliases = {"#copy"},
desc = "Use the blocks in your clipboard as the pattern")
public Pattern clipboard(LocalSession session) throws EmptyClipboardException {
ClipboardHolder holder = session.getClipboard();
@ -68,13 +72,10 @@ public class PatternCommands extends MethodCommands {
}
@Command(
aliases = {"#simplex"},
desc = "Use simplex noise to randomize blocks. Tutorial: https://imgur.com/a/rwVAE",
usage = "<scale=10> <pattern>",
min = 2,
max = 2
name = "#simplex",
desc = "Use simplex noise to randomize blocks. Tutorial: https://imgur.com/a/rwVAE"
)
public Pattern simplex(double scale, Pattern other) {
public Pattern simplex(@Arg() double scale, Pattern other) {
if (other instanceof RandomPattern) {
scale = (1d / Math.max(1, scale));
RandomCollection<Pattern> collection = ((RandomPattern) other).getCollection();
@ -84,31 +85,24 @@ public class PatternCommands extends MethodCommands {
}
@Command(
aliases = {"#color"},
desc = "Use the block closest to a specific color",
usage = "<color>",
min = 1,
max = 1
name = "#color",
desc = "Use the block closest to a specific color"
)
public Pattern color(TextureUtil textureUtil, String arg) {
Color color = ColorUtil.parseColor(arg);
return textureUtil.getNearestBlock(color.getRGB()).getDefaultState();
public Pattern color(TextureUtil textureUtil, String color) {
Color colorObj = ColorUtil.parseColor(color);
return textureUtil.getNearestBlock(colorObj.getRGB()).getDefaultState();
}
@Command(
aliases = {"#anglecolor"},
desc = "A darker block based on the existing terrain angle",
usage = "[randomize=true] [max-complexity=100] [distance=1]",
min = 0,
max = 3
name = "#anglecolor",
desc = "A darker block based on the existing terrain angle"
)
public Pattern anglecolor(Extent extent, LocalSession session, @Optional("true") boolean randomize, @Optional("100") double maxComplexity, @Optional("1") int distance) {
return new AngleColorPattern(extent, session, distance);
}
@Command(
aliases = {"#angledata"},
usage = "[distance=1]",
name = "#angledata",
desc = "Block data based on the existing terrain angle"
)
public Pattern angledata(Extent extent, @Optional("1") int distance) {
@ -116,11 +110,8 @@ public class PatternCommands extends MethodCommands {
}
@Command(
aliases = {"#saturate"},
desc = "Saturate the existing block with a color",
usage = "<color>",
min = 1,
max = 3
name = "#saturate",
desc = "Saturate the existing block with a color"
)
public Pattern saturate(Extent extent, LocalSession session, String arg) {
Color color = ColorUtil.parseColor(arg);
@ -128,11 +119,8 @@ public class PatternCommands extends MethodCommands {
}
@Command(
aliases = {"#averagecolor"},
desc = "Average between the existing block and a color",
usage = "<color>",
min = 1,
max = 3
name = "#averagecolor",
desc = "Average between the existing block and a color"
)
public Pattern averagecolor(Extent extent, LocalSession session, String arg) {
Color color = ColorUtil.parseColor(arg);
@ -140,42 +128,32 @@ public class PatternCommands extends MethodCommands {
}
@Command(
aliases = {"#desaturate"},
desc = "Desaturated color of the existing block",
usage = "[percent=100] [randomize=true] [max-complexity=100]",
min = 0,
max = 3
name = "#desaturate",
desc = "Desaturated color of the existing block"
)
public Pattern desaturate(Extent extent, LocalSession session, @Optional("100") double percent) {
return new DesaturatePattern(extent, percent / 100d, session);
}
@Command(
aliases = {"#lighten"},
desc = "Lighten the existing block",
min = 0,
max = 2
name = "#lighten",
desc = "Lighten the existing block"
)
public Pattern lighten(Extent extent, TextureUtil util) {
return new ShadePattern(extent, false, util);
}
@Command(
aliases = {"#darken"},
desc = "Darken the existing block",
min = 0,
max = 2
name = "#darken",
desc = "Darken the existing block"
)
public Pattern darken(Extent extent, TextureUtil util) {
return new ShadePattern(extent, true, util);
}
@Command(
aliases = {"#fullcopy"},
desc = "Places your full clipboard at each block",
usage = "[schem|folder|url=#copy] [rotate=false] [flip=false]",
min = 0,
max = 2
name = "#fullcopy",
desc = "Places your full clipboard at each block"
)
public Pattern fullcopy(Player player, Extent extent, LocalSession session, @Optional("#copy") String location, @Optional("false") boolean rotate, @Optional("false") boolean flip) throws EmptyClipboardException, InputParseException, IOException {
List<ClipboardHolder> clipboards;
@ -203,127 +181,99 @@ public class PatternCommands extends MethodCommands {
}
@Command(
aliases = {"#buffer"},
name = "#buffer",
desc = "Only place a block once while a pattern is in use",
help = "Only place a block once while a pattern is in use\n" +
"Use with a brush when you don't want to apply to the same spot twice",
usage = "<pattern>",
min = 1,
max = 1
descFooter = "Only place a block once while a pattern is in use\n" +
"Use with a brush when you don't want to apply to the same spot twice"
)
public Pattern buffer(Actor actor, Pattern pattern) {
return new BufferedPattern(FawePlayer.wrap(actor), pattern);
}
@Command(
aliases = {"#buffer2d"},
desc = "Only place a block once in a column while a pattern is in use",
usage = "<pattern>",
min = 1,
max = 1
name = "#buffer2d",
desc = "Only place a block once in a column while a pattern is in use"
)
public Pattern buffer2d(Actor actor, Pattern pattern) {
return new BufferedPattern2D(FawePlayer.wrap(actor), pattern);
}
@Command(
aliases = {"#iddatamask"},
name = "#iddatamask",
desc = "Use the pattern's id and the existing blocks data with the provided mask",
help = "Use the pattern's id and the existing blocks data with the provided mask\n" +
" - Use to replace slabs or where the data values needs to be shifted instead of set",
usage = "<bitmask=15> <pattern>",
min = 2,
max = 2
descFooter = "Use the pattern's id and the existing blocks data with the provided mask\n" +
" - Use to replace slabs or where the data values needs to be shifted instead of set"
)
public Pattern iddatamask(Actor actor, LocalSession session, Extent extent, @Range(min = 0, max = 15) int bitmask, Pattern pattern) {
return new IdDataMaskPattern(extent, pattern, bitmask);
}
@Command(
aliases = {"#id"},
desc = "Only change the block id",
usage = "<pattern>",
min = 1,
max = 1
name = "#id",
desc = "Only change the block id"
)
public Pattern id(Actor actor, LocalSession session, Extent extent, Pattern pattern) {
return new IdPattern(extent, pattern);
}
@Command(
aliases = {"#data"},
desc = "Only change the block data",
usage = "<pattern>",
min = 1,
max = 1
name = "#data",
desc = "Only change the block data"
)
public Pattern data(Actor actor, LocalSession session, Extent extent, Pattern pattern) {
return new DataPattern(extent, pattern);
}
@Command(
aliases = {"#biome", "$"},
desc = "Set the biome",
usage = "<biome>",
min = 1,
max = 1
name = "#biome",
aliases = {"$"},
desc = "Set the biome"
)
public Pattern biome(Actor actor, LocalSession session, Extent extent, BiomeType biome) {
return new BiomePattern(extent, biome);
}
@Command(
aliases = {"#relative", "#~", "#r", "#rel"},
desc = "Offset the pattern to where you click",
usage = "<pattern>",
min = 1,
max = 1
name = "#relative",
aliases = {"#~", "#r", "#rel"},
desc = "Offset the pattern to where you click"
)
public Pattern relative(Actor actor, LocalSession session, Extent extent, Pattern pattern) {
return new RelativePattern(pattern);
}
@Command(
aliases = {"#!x", "#nx", "#nox"},
name = "#!x",
aliases = {"#nx", "#nox"},
desc = "The pattern will not be provided the x axis info",
help = "The pattern will not be provided the z axis info.\n" +
"Example: #!x[#!z[#~[#l3d[pattern]]]]",
usage = "<pattern>",
min = 1,
max = 1
descFooter = "The pattern will not be provided the z axis info.\n" +
"Example: #!x[#!z[#~[#l3d[pattern]]]]"
)
public Pattern nox(Actor actor, LocalSession session, Extent extent, Pattern pattern) {
return new NoXPattern(pattern);
}
@Command(
aliases = {"#!y", "#ny", "#noy"},
desc = "The pattern will not be provided the y axis info",
usage = "<pattern>",
min = 1,
max = 1
name = "#!y",
aliases = {"#ny", "#noy"},
desc = "The pattern will not be provided the y axis info"
)
public Pattern noy(Actor actor, LocalSession session, Extent extent, Pattern pattern) {
return new NoYPattern(pattern);
}
@Command(
aliases = {"#!z", "#nz", "#noz"},
desc = "The pattern will not be provided the z axis info",
usage = "<pattern>",
min = 1,
max = 1
name = "#!z",
aliases = {"#nz", "#noz"},
desc = "The pattern will not be provided the z axis info"
)
public Pattern noz(Actor actor, LocalSession session, Extent extent, Pattern pattern) {
return new NoZPattern(pattern);
}
@Command(
aliases = {"#mask"},
desc = "Apply a pattern depending on a mask",
usage = "<mask> <pattern-true> <pattern-false>",
min = 3,
max = 3
name = "#mask",
desc = "Apply a pattern depending on a mask"
)
public Pattern mask(Actor actor, LocalSession session, Mask mask, Pattern pass, Pattern fail) {
PatternExtent extent = new PatternExtent(pass);
@ -331,55 +281,42 @@ public class PatternCommands extends MethodCommands {
}
@Command(
aliases = {"#offset"},
desc = "Offset a pattern",
usage = "<dx> <dy> <dz> <pattern>",
min = 4,
max = 4
name = "#offset",
desc = "Offset a pattern"
)
public Pattern offset(Actor actor, LocalSession session, double x, double y, double z, Pattern pattern) {
return new OffsetPattern(pattern, (int) x, (int) y, (int) z);
}
@Command(
aliases = {"#surfacespread"},
desc = "Applies to only blocks on a surface. Selects a block from provided pattern with a given ranomized offset `[0, <distance>)`. e.g. Use `#existing` to randomly offset blocks in the world, or `#copy` to offset blocks in your clipboard",
usage = "<distance> <pattern>",
min = 2,
max = 2
name = "#surfacespread",
desc = "Applies to only blocks on a surface. Selects a block from provided pattern with a given ranomized offset `[0, <distance>)`. e.g. Use `#existing` to randomly offset blocks in the world, or `#copy` to offset blocks in your clipboard"
)
public Pattern surfacespread(Actor actor, LocalSession session, double distance, Pattern pattern) {
return new SurfaceRandomOffsetPattern(pattern, (int) distance);
}
@Command(
aliases = {"#solidspread"},
desc = "Randomly spread solid blocks",
usage = "<dx> <dy> <dz> <pattern>",
min = 4,
max = 4
name = "#solidspread",
desc = "Randomly spread solid blocks"
)
public Pattern solidspread(Actor actor, LocalSession session, double x, double y, double z, Pattern pattern) {
return new SolidRandomOffsetPattern(pattern, (int) x, (int) y, (int) z);
}
@Command(
aliases = {"#spread", "#randomoffset"},
desc = "Randomly spread blocks",
usage = "<dx> <dy> <dz> <pattern>",
min = 4,
max = 4
name = "#spread",
aliases = {"#randomoffset"},
desc = "Randomly spread blocks"
)
public Pattern spread(Actor actor, LocalSession session, double x, double y, double z, Pattern pattern) {
return new RandomOffsetPattern(pattern, (int) x, (int) y, (int) z);
}
@Command(
aliases = {"#linear", "#l"},
desc = "Sequentially set blocks from a list of patterns",
usage = "<pattern>",
min = 1,
max = 1
name = "#linear",
aliases = {"#l"},
desc = "Sequentially set blocks from a list of patterns"
)
public Pattern linear(Actor actor, LocalSession session, Pattern other) {
if (other instanceof RandomPattern) {
@ -390,11 +327,9 @@ public class PatternCommands extends MethodCommands {
}
@Command(
aliases = {"#linear3d", "#l3d"},
desc = "Use the x,y,z coordinate to pick a block from the list",
usage = "<pattern>",
min = 1,
max = 1
name = "#linear3d",
aliases = {"#l3d"},
desc = "Use the x,y,z coordinate to pick a block from the list"
)
public Pattern linear3d(Actor actor, LocalSession session, Pattern other) {
if (other instanceof RandomPattern) {
@ -405,11 +340,9 @@ public class PatternCommands extends MethodCommands {
}
@Command(
aliases = {"#linear2d", "#l2d"},
desc = "Use the x,z coordinate to pick a block from the list",
usage = "<pattern>",
min = 1,
max = 1
name = "#linear2d",
aliases = {"#l2d"},
desc = "Use the x,z coordinate to pick a block from the list"
)
public Pattern linear2d(Actor actor, LocalSession session, Pattern other) {
if (other instanceof RandomPattern) {
@ -420,11 +353,9 @@ public class PatternCommands extends MethodCommands {
}
@Command(
aliases = {"=", "#=", "#expression"},
desc = "Expression pattern: http://wiki.sk89q.com/wiki/WorldEdit/Expression_syntax",
usage = "<expression>",
min = 1,
max = 1
name = "=",
aliases = {"#=", "#expression"},
desc = "Expression pattern: http://wiki.sk89q.com/wiki/WorldEdit/Expression_syntax"
)
public Pattern expression(Actor actor, LocalSession session, Extent extent, String input) throws ExpressionException {
Expression exp = Expression.compile(input, "x", "y", "z");

Datei anzeigen

@ -39,6 +39,7 @@ import com.boydti.fawe.object.exception.FaweException;
import com.boydti.fawe.object.visitor.Fast2DIterator;
import com.boydti.fawe.util.MathMan;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.minecraft.util.commands.CommandContext;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.WorldEdit;
@ -73,6 +74,7 @@ import com.sk89q.worldedit.regions.RegionOperationException;
import com.sk89q.worldedit.regions.Regions;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.util.TreeGenerator.TreeType;
import com.sk89q.worldedit.util.command.parametric.Optional;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.biome.BiomeTypes;
import com.sk89q.worldedit.world.biome.Biomes;
@ -191,7 +193,7 @@ public class RegionCommands {
}
@Command(
name = "/setskylight"
name = "/setskylight",
desc = "Set sky lighting in a selection"
)
@CommandPermissions("worldedit.light.set")
@ -295,10 +297,7 @@ public class RegionCommands {
@Command(
aliases = { "/set", "/s" },
usage = "[pattern]",
desc = "Set all blocks within selection",
min = 1,
max = 1
desc = "Set all blocks within selection"
)
@CommandPermissions("worldedit.region.set")
@Logging(REGION)
@ -329,11 +328,8 @@ public class RegionCommands {
}
@Command(
aliases = {"/lay"},
usage = "<pattern>",
desc = "Set the top block in the region",
min = 1,
max = 1
name = "/lay",
desc = "Set the top block in the region"
)
@CommandPermissions("worldedit.region.overlay")
@Logging(REGION)
@ -437,9 +433,10 @@ public class RegionCommands {
}
@Command(
aliases = {"/wea", "wea", "worldeditanywhere", "/worldeditanywhere", "/weanywhere"},
name = "/wea",
aliases = {"wea", "worldeditanywhere", "/worldeditanywhere", "/weanywhere"},
desc = "Bypass region restrictions",
help = "Bypass region restrictions"
descFooter = "Bypass region restrictions"
)
@CommandPermissions("fawe.admin")
public void wea(Player player) throws WorldEditException {
@ -451,9 +448,10 @@ public class RegionCommands {
}
@Command(
aliases = {"/wer", "wer", "worldeditregion", "/worldeditregion", "select", "/select"},
name = "/wer",
aliases = {"wer", "worldeditregion", "/worldeditregion", "select", "/select"},
desc = "Select your current allowed region",
help = "Select your current allowed region"
descFooter = "Select your current allowed region"
)
@CommandPermissions("fawe.worldeditregion")
public void wer(FawePlayer fp) throws WorldEditException {
@ -468,18 +466,15 @@ public class RegionCommands {
@Command(
aliases = { "/move" },
usage = "[count] [direction] [leave-id]",
flags = "saeb",
name = "/move",
desc = "Move the contents of the selection",
help =
descFooter =
"Moves the contents of the selection.\n" +
"The -s flag shifts the selection to the target location.\n" +
"The -b also copies biomes\n" +
"The -e ignores entities\n" +
"The -a ignores air blocks.\n" +
"Optionally fills the old location with <leave-id>.",
max = 3
"Optionally fills the old location with <leave-id>."
)
@CommandPermissions("worldedit.region.move")
@Logging(ORIENTATION_REGION)
@ -520,13 +515,10 @@ public class RegionCommands {
}
@Command(
aliases = { "/fall" },
usage = "[replace]",
flags = "m",
name = "/fall",
desc = "Have the blocks in the selection fall",
help = "Make the blocks in the selection fall\n" +
"The -m flag will only fall within the vertical selection.",
max = 2
descFooter = "Make the blocks in the selection fall\n" +
"The -m flag will only fall within the vertical selection."
)
@CommandPermissions("worldedit.region.fall")
@Logging(ORIENTATION_REGION)
@ -584,16 +576,13 @@ public class RegionCommands {
}
@Command(
aliases = { "/deform" },
usage = "<expression>",
name = "/deform",
desc = "Deforms a selected region with an expression",
help =
descFooter =
"Deforms a selected region with an expression\n" +
"The expression is executed for each block and is expected\n" +
"to modify the variables x, y and z to point to a new block\n" +
"to fetch. See also tinyurl.com/wesyntax.",
flags = "ro",
min = 1
"to fetch. See also tinyurl.com/wesyntax."
)
@CommandPermissions("worldedit.region.deform")
@Logging(ALL)
@ -639,14 +628,12 @@ public class RegionCommands {
}
@Command(
aliases = { "/regen" },
usage = "[biome] [seed]",
name = "/regen",
desc = "Regenerates the contents of the selection",
help =
descFooter =
"Regenerates the contents of the current selection.\n" +
"This command might affect things outside the selection,\n" +
"if they are within the same chunk.",
max = 2
"if they are within the same chunk."
)
@CommandPermissions("worldedit.regen")
@Logging(REGION)
@ -682,13 +669,11 @@ public class RegionCommands {
}
@Command(
aliases = { "/hollow" },
usage = "[<thickness>[ <pattern>]]",
name = "/hollow",
desc = "Hollows out the object contained in this selection",
help = "Hollows out the object contained in this selection.\n" +
descFooter = "Hollows out the object contained in this selection.\n" +
"Optionally fills the hollowed out part with the given block.\n" +
"Thickness is measured in manhattan distance.",
max = 2
"Thickness is measured in manhattan distance."
)
@CommandPermissions("worldedit.region.hollow")
@Logging(REGION)

Datei anzeigen

@ -551,11 +551,9 @@ public class SchematicCommands {
/*
@Command(
aliases = {"show"},
name = "show",
desc = "Show a schematic",
usage = "[global|mine|<filter>]",
flags = "dnp",
help = "List all schematics in the schematics directory\n" +
descFooter = "List all schematics in the schematics directory\n" +
" -f <format> restricts by format\n"
)
@CommandPermissions("worldedit.schematic.show")

Datei anzeigen

@ -41,9 +41,8 @@ public class SuperPickaxeCommands {
}
@Command(
aliases = {"single"},
desc = "Enable the single block super pickaxe mode",
max = 0
name = "single",
desc = "Enable the single block super pickaxe mode"
)
@CommandPermissions("worldedit.superpickaxe")
public void single(Player player, LocalSession session) throws WorldEditException {
@ -53,11 +52,8 @@ public class SuperPickaxeCommands {
}
@Command(
aliases = {"area"},
usage = "<radius>",
desc = "Enable the area super pickaxe pickaxe mode",
min = 1,
max = 1
name = "area",
desc = "Enable the area super pickaxe pickaxe mode"
)
@CommandPermissions("worldedit.superpickaxe.area")
public void area(Player player, LocalSession session, CommandContext args) throws WorldEditException {
@ -76,11 +72,9 @@ public class SuperPickaxeCommands {
}
@Command(
aliases = {"recur", "recursive"},
usage = "<radius>",
desc = "Enable the recursive super pickaxe pickaxe mode",
min = 1,
max = 1
name = "recur",
aliases = {"recursive"},
desc = "Enable the recursive super pickaxe pickaxe mode"
)
@CommandPermissions("worldedit.superpickaxe.recursive")
public void recursive(Player player, LocalSession session, CommandContext args) throws WorldEditException {

Datei anzeigen

@ -23,7 +23,7 @@ import java.util.Set;
@Command(aliases = {"transforms"},
desc = "Help for the various transforms. [More Info](https://git.io/v9KHO)",
help = "Transforms modify how a block is placed\n" +
descFooter = "Transforms modify how a block is placed\n" +
" - Use [brackets] for arguments\n" +
" - Use , to OR multiple\n" +
" - Use & to AND multiple\n" +
@ -35,11 +35,9 @@ public class TransformCommands extends MethodCommands {
}
@Command(
aliases = {"#linear", "#l"},
desc = "Sequentially pick from a list of transform",
usage = "<transform>",
min = 1,
max = 2
name = "#linear",
aliases = {"#l"},
desc = "Sequentially pick from a list of transform"
)
public ResettableExtent linear(Actor actor, LocalSession session, @Optional("#null") ResettableExtent other) {
if (other instanceof RandomTransform) {
@ -50,11 +48,9 @@ public class TransformCommands extends MethodCommands {
}
@Command(
aliases = {"#linear3d", "#l3d"},
desc = "Use the x,y,z coordinate to pick a transform from the list",
usage = "<transform>",
min = 1,
max = 2
name = "#linear3d",
aliases = {"#l3d"},
desc = "Use the x,y,z coordinate to pick a transform from the list"
)
public ResettableExtent linear3d(Actor actor, LocalSession session, @Optional("#null") ResettableExtent other) {
if (other instanceof RandomTransform) {
@ -65,55 +61,41 @@ public class TransformCommands extends MethodCommands {
}
@Command(
aliases = {"#pattern"},
desc = "Always use a specific pattern",
usage = "<pattern> [transform]",
min = 1,
max = 2
name = "#pattern",
desc = "Always use a specific pattern"
)
public ResettableExtent pattern(Actor actor, LocalSession session, Pattern pattern, @Optional("#null") ResettableExtent other) {
return new PatternTransform(other, pattern);
}
@Command(
aliases = {"#offset"},
desc = "Offset transform",
usage = "<dx> <dy> <dz> [transform]",
min = 3,
max = 4
name = "#offset",
desc = "Offset transform"
)
public ResettableExtent offset(Actor actor, LocalSession session, double x, double y, double z, @Optional("#null") ResettableExtent other) {
return new OffsetExtent(other, (int) x, (int) y, (int) z);
}
@Command(
aliases = {"#spread", "#randomoffset"},
desc = "Random offset transform",
usage = "<dx> <dy> <dz> [transform]",
min = 3,
max = 4
name = "#spread",
aliases = {"#randomoffset"},
desc = "Random offset transform"
)
public ResettableExtent randomoffset(Actor actor, LocalSession session, double x, double y, double z, @Optional("#null") ResettableExtent other) {
return new RandomOffsetTransform(other, (int) x, (int) y, (int) z);
}
@Command(
aliases = {"#scale"},
desc = "All changes will be scaled",
usage = "<dx> <dy> <dz> [transform]",
min = 3,
max = 4
name = "#scale",
desc = "All changes will be scaled"
)
public ResettableExtent scale(Actor actor, LocalSession session, double x, double y, double z, @Optional("#null") ResettableExtent other) {
return new ScaleTransform(other, x, y, z);
}
@Command(
aliases = {"#rotate"},
desc = "All changes will be rotate around the initial position",
usage = "<rotateX> <rotateY> <rotateZ> [transform]",
min = 3,
max = 4
name = "#rotate",
desc = "All changes will be rotate around the initial position"
)
public ResettableExtent rotate(Player player, LocalSession session, double x, double y, double z, @Optional("#null") ResettableExtent other) {
ExtentTraverser traverser = new ExtentTraverser(other).find(TransformExtent.class);

Datei anzeigen

@ -207,7 +207,7 @@ public class UtilityCommands {
@Command(
name = "patterns",
desc = "View help about patterns",
help = "Patterns determine what blocks are placed\n" +
descFooter = "Patterns determine what blocks are placed\n" +
" - Use [brackets] for arguments\n" +
" - Use , to OR multiple\n" +
"e.g. #surfacespread[10][#existing],andesite\n" +
@ -221,9 +221,8 @@ public class UtilityCommands {
@Command(
name = "masks",
usage = "[page=1|search|mask]",
desc = "View help about masks",
help = "Masks determine if a block can be placed\n" +
descFooter = "Masks determine if a block can be placed\n" +
" - Use [brackets] for arguments\n" +
" - Use , to OR multiple\n" +
" - Use & to AND multiple\n" +
@ -239,7 +238,7 @@ public class UtilityCommands {
@Command(
name = "transforms",
desc = "View help about transforms",
help = "Transforms modify how a block is placed\n" +
descFooter = "Transforms modify how a block is placed\n" +
" - Use [brackets] for arguments\n" +
" - Use , to OR multiple\n" +
" - Use & to AND multiple\n" +