mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-13 14:48:34 +00:00
Various command (use es6 if java9 + nashorn)
This commit is contained in:
@ -62,7 +62,7 @@ public class MaskCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"false"},
|
||||
aliases = {"false", "#false"},
|
||||
desc = "Always false"
|
||||
)
|
||||
public Mask falseMask(Extent extent) {
|
||||
@ -70,7 +70,7 @@ public class MaskCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"true"},
|
||||
aliases = {"true", "#true"},
|
||||
desc = "Always true"
|
||||
)
|
||||
public Mask trueMask(Extent extent) {
|
||||
@ -262,7 +262,7 @@ public class MaskCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"\\", "/", "#angle"},
|
||||
aliases = {"\\", "/", "#angle", "#\\", "#/"},
|
||||
desc = "Restrict to specific terrain angle",
|
||||
help = "Restrict to specific terrain angle\n" +
|
||||
"The -o flag will only overlay\n" +
|
||||
@ -289,7 +289,7 @@ public class MaskCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"(", ")", "#roc"},
|
||||
aliases = {"(", ")", "#roc", "#(", "#)"},
|
||||
desc = "Restrict to near specific terrain slope rate of change",
|
||||
help = "Restrict to near specific terrain slope rate of change\n" +
|
||||
"The -o flag will only overlay\n" +
|
||||
@ -315,7 +315,7 @@ public class MaskCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"^", "#extrema"},
|
||||
aliases = {"^", "#extrema", "#^"},
|
||||
desc = "Restrict to near specific terrain extrema",
|
||||
help = "Restrict to near specific terrain extrema\n" +
|
||||
"The -o flag will only overlay\n" +
|
||||
@ -342,7 +342,7 @@ public class MaskCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"{"},
|
||||
aliases = {"{", "#{"},
|
||||
desc = "Restricts blocks to within a specific radius range of the initial block",
|
||||
usage = "<min> <max>",
|
||||
min = 2,
|
||||
@ -353,7 +353,7 @@ public class MaskCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"|"},
|
||||
aliases = {"|", "#|", "#side"},
|
||||
desc = "sides with a specific number of other blocks",
|
||||
usage = "<mask> <min> <max>",
|
||||
min = 3,
|
||||
@ -364,7 +364,7 @@ public class MaskCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"~"},
|
||||
aliases = {"~", "#~", "#adjacent"},
|
||||
desc = "Adjacent to a specific number of other blocks",
|
||||
usage = "<mask> [min=1] [max=8]",
|
||||
min = 1,
|
||||
@ -382,7 +382,7 @@ public class MaskCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"<"},
|
||||
aliases = {"<", "#<", "#below"},
|
||||
desc = "below a specific block",
|
||||
usage = "<mask>",
|
||||
min = 1,
|
||||
@ -394,7 +394,7 @@ public class MaskCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {">"},
|
||||
aliases = {">", "#>", "#above"},
|
||||
desc = "above a specific block",
|
||||
usage = "<mask>",
|
||||
min = 1,
|
||||
@ -406,7 +406,7 @@ public class MaskCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"$", "#biome"},
|
||||
aliases = {"$", "#biome", "#$"},
|
||||
desc = "in a specific biome",
|
||||
help = "in a specific biome. For a list of biomes use //biomelist",
|
||||
usage = "<biome>",
|
||||
@ -418,7 +418,7 @@ public class MaskCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"%"},
|
||||
aliases = {"%", "#%", "#percent"},
|
||||
desc = "percentage chance",
|
||||
usage = "<chance>",
|
||||
min = 1,
|
||||
@ -430,7 +430,7 @@ public class MaskCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"="},
|
||||
aliases = {"=", "#=", "#expression"},
|
||||
desc = "expression mask",
|
||||
usage = "<expression>",
|
||||
min = 1,
|
||||
@ -444,7 +444,7 @@ public class MaskCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"!", "#not", "#negate"},
|
||||
aliases = {"!", "#not", "#negate", "#!"},
|
||||
desc = "Negate another mask",
|
||||
usage = "<mask>",
|
||||
min = 1,
|
||||
|
@ -418,7 +418,7 @@ public class PatternCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"="},
|
||||
aliases = {"=", "#=", "#expression"},
|
||||
desc = "Expression pattern: http://wiki.sk89q.com/wiki/WorldEdit/Expression_syntax",
|
||||
usage = "<expression>",
|
||||
min = 1,
|
||||
|
@ -382,11 +382,11 @@ public class SchematicCommands extends MethodCommands {
|
||||
|
||||
@Command(aliases = {"move", "m"}, usage = "<directory>", desc = "Move your loaded schematic", help = "Move your currently loaded schematics", min = 1, max = 1)
|
||||
@CommandPermissions({"worldedit.schematic.move", "worldedit.schematic.move.other"})
|
||||
public void move(final Player player, final LocalSession session, final CommandContext args) throws WorldEditException {
|
||||
public void move(final Player player, final LocalSession session, String directory) throws WorldEditException {
|
||||
final LocalConfiguration config = this.worldEdit.getConfiguration();
|
||||
final File working = this.worldEdit.getWorkingDirectoryFile(config.saveDir);
|
||||
final File dir = Settings.IMP.PATHS.PER_PLAYER_SCHEMATICS ? new File(working, player.getUniqueId().toString()) : working;
|
||||
File destDir = new File(dir, args.getString(0));
|
||||
File destDir = new File(dir, directory);
|
||||
if (!MainUtil.isInSubDirectory(working, destDir)) {
|
||||
player.printError("Directory " + destDir + " does not exist!");
|
||||
return;
|
||||
|
@ -36,10 +36,8 @@ import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.entity.Player;
|
||||
import com.sk89q.worldedit.event.platform.ConfigurationLoadEvent;
|
||||
import com.sk89q.worldedit.extension.platform.Actor;
|
||||
import com.sk89q.worldedit.extension.platform.Capability;
|
||||
import com.sk89q.worldedit.extension.platform.Platform;
|
||||
import com.sk89q.worldedit.extension.platform.PlatformManager;
|
||||
import com.sk89q.worldedit.extension.platform.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.text.DateFormat;
|
||||
@ -113,6 +111,7 @@ public class WorldEditCommands {
|
||||
we.getPlatformManager().queryCapability(Capability.CONFIGURATION).reload();
|
||||
we.getEventBus().post(new ConfigurationLoadEvent(we.getPlatformManager().queryCapability(Capability.CONFIGURATION).getConfiguration()));
|
||||
Fawe.get().setupConfigs();
|
||||
CommandManager.getInstance().register(we.getPlatformManager().queryCapability(Capability.USER_COMMANDS));
|
||||
actor.print(BBC.getPrefix() + "Reloaded WorldEdit " + we.getVersion() + " and FAWE (" + Fawe.get().getVersion() + ")");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user