mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-14 23:38:34 +00:00
Port snapshot commands, update some time stuff to new time
This commit is contained in:
@ -50,6 +50,10 @@ import com.sk89q.worldedit.command.ScriptingCommands;
|
||||
import com.sk89q.worldedit.command.ScriptingCommandsRegistration;
|
||||
import com.sk89q.worldedit.command.SelectionCommands;
|
||||
import com.sk89q.worldedit.command.SelectionCommandsRegistration;
|
||||
import com.sk89q.worldedit.command.SnapshotCommands;
|
||||
import com.sk89q.worldedit.command.SnapshotCommandsRegistration;
|
||||
import com.sk89q.worldedit.command.SnapshotUtilCommands;
|
||||
import com.sk89q.worldedit.command.SnapshotUtilCommandsRegistration;
|
||||
import com.sk89q.worldedit.command.argument.Arguments;
|
||||
import com.sk89q.worldedit.command.argument.CommaSeparatedValuesConverter;
|
||||
import com.sk89q.worldedit.command.argument.DirectionConverter;
|
||||
@ -58,6 +62,7 @@ import com.sk89q.worldedit.command.argument.ExpandAmountConverter;
|
||||
import com.sk89q.worldedit.command.argument.MaskConverter;
|
||||
import com.sk89q.worldedit.command.argument.PatternConverter;
|
||||
import com.sk89q.worldedit.command.argument.VectorConverter;
|
||||
import com.sk89q.worldedit.command.argument.ZonedDateTimeConverter;
|
||||
import com.sk89q.worldedit.command.util.CommandPermissionsConditionGenerator;
|
||||
import com.sk89q.worldedit.command.util.PermissionCondition;
|
||||
import com.sk89q.worldedit.entity.Entity;
|
||||
@ -201,6 +206,7 @@ public final class PlatformCommandMananger {
|
||||
VectorConverter.register(commandManager);
|
||||
EnumConverter.register(commandManager);
|
||||
ExpandAmountConverter.register(commandManager);
|
||||
ZonedDateTimeConverter.register(commandManager);
|
||||
}
|
||||
|
||||
private void registerAlwaysInjectedValues() {
|
||||
@ -250,6 +256,24 @@ public final class PlatformCommandMananger {
|
||||
.required()
|
||||
.build());
|
||||
});
|
||||
commandManager.register("snapshot", cmd -> {
|
||||
cmd.aliases(ImmutableList.of("snapshot", "snap"));
|
||||
cmd.description("Snapshot commands for saving/loading snapshots");
|
||||
cmd.action(Command.Action.NULL_ACTION);
|
||||
|
||||
CommandManager manager = DefaultCommandManagerService.getInstance()
|
||||
.newCommandManager();
|
||||
register(
|
||||
manager,
|
||||
SnapshotCommandsRegistration.builder(),
|
||||
new SnapshotCommands(worldEdit)
|
||||
);
|
||||
|
||||
cmd.addPart(SubCommandPart.builder("action", "Sub-command to run.")
|
||||
.withCommands(manager.getAllCommands().collect(Collectors.toList()))
|
||||
.required()
|
||||
.build());
|
||||
});
|
||||
commandManager.register("brush", cmd -> {
|
||||
cmd.aliases(ImmutableList.of("br"));
|
||||
cmd.description("Brushing commands");
|
||||
@ -318,6 +342,11 @@ public final class PlatformCommandMananger {
|
||||
SelectionCommandsRegistration.builder(),
|
||||
new SelectionCommands(worldEdit)
|
||||
);
|
||||
register(
|
||||
commandManager,
|
||||
SnapshotUtilCommandsRegistration.builder(),
|
||||
new SnapshotUtilCommands(worldEdit)
|
||||
);
|
||||
|
||||
// Unported commands are below. Delete once they're added to the main manager above.
|
||||
/*
|
||||
@ -333,10 +362,6 @@ public final class PlatformCommandMananger {
|
||||
.describeAs("WorldEdit commands")
|
||||
.registerMethods(new WorldEditCommands(worldEdit))
|
||||
.parent()
|
||||
.group("snapshot", "snap")
|
||||
.describeAs("Schematic commands for saving/loading areas")
|
||||
.registerMethods(new SnapshotCommands(worldEdit))
|
||||
.parent()
|
||||
.group("brush", "br")
|
||||
.describeAs("Brushing commands")
|
||||
.register(adapt(new ShapedBrushCommand(new DeformCommand(), "worldedit.brush.deform")), "deform")
|
||||
|
Reference in New Issue
Block a user