mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Merge branch 'commanding-pipeline' of https://github.com/IntellectualSites/FastAsyncWorldEdit-1.13 into commanding-pipeline
Conflicts: worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java worldedit-core/src/main/java/com/boydti/fawe/beta/filters/DistrFilter.java worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/ChunkCache.java worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/ParallelQueueExtent.java worldedit-core/src/main/java/com/boydti/fawe/command/CFICommands.java worldedit-core/src/main/java/com/boydti/fawe/object/brush/visualization/cfi/HeightMapMCAGenerator.java worldedit-core/src/main/java/com/boydti/fawe/object/brush/visualization/cfi/MCAWriter.java worldedit-core/src/main/java/com/boydti/fawe/wrappers/WorldWrapper.java worldedit-core/src/main/java/com/sk89q/worldedit/LocalSession.java worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolUtilCommands.java worldedit-core/src/main/java/com/sk89q/worldedit/world/NullWorld.java worldedit-core/src/main/java/com/sk89q/worldedit/world/World.java worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java
This commit is contained in:
@ -31,6 +31,8 @@ import static com.sk89q.worldedit.regions.Regions.minimumBlockY;
|
||||
|
||||
import com.boydti.fawe.FaweAPI;
|
||||
import com.boydti.fawe.FaweCache;
|
||||
import com.boydti.fawe.beta.implementation.processors.ChunkSendProcessor;
|
||||
import com.boydti.fawe.beta.implementation.processors.NullProcessor;
|
||||
import com.boydti.fawe.config.BBC;
|
||||
import com.boydti.fawe.object.FaweLimit;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
@ -76,6 +78,9 @@ import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
import org.enginehub.piston.annotation.Command;
|
||||
import org.enginehub.piston.annotation.CommandContainer;
|
||||
import org.enginehub.piston.annotation.param.Arg;
|
||||
@ -102,15 +107,29 @@ public class RegionCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
name = "/set",
|
||||
desc = "Sets all the blocks in the region"
|
||||
name = "/air",
|
||||
aliases = {"/0"},
|
||||
desc = "Sets all the blocks in the region to air"
|
||||
)
|
||||
@CommandPermissions("worldedit.region.set")
|
||||
@Logging(REGION)
|
||||
public void air(Actor actor, EditSession editSession,
|
||||
@Selection Region region,
|
||||
InjectedValueAccess context) throws WorldEditException {
|
||||
set(actor, editSession, region, BlockTypes.AIR, context);
|
||||
}
|
||||
|
||||
@Command(
|
||||
name = "/set",
|
||||
aliases = {"/"},
|
||||
desc = "Sets all the blocks in the region"
|
||||
)
|
||||
@CommandPermissions("worldedit.region.set")
|
||||
@Logging(REGION)
|
||||
public void set(Actor actor, EditSession editSession,
|
||||
@Selection Region region,
|
||||
@Arg(desc = "The pattern of blocks to set")
|
||||
Pattern pattern, InjectedValueAccess context) throws WorldEditException {
|
||||
@Selection Region region,
|
||||
@Arg(desc = "The pattern of blocks to set")
|
||||
Pattern pattern, InjectedValueAccess context) throws WorldEditException {
|
||||
actor.checkConfirmationRegion(() -> {
|
||||
int affected = editSession.setBlocks(region, pattern);
|
||||
if (affected != 0) {
|
||||
@ -121,6 +140,21 @@ public class RegionCommands {
|
||||
}, getArguments(context), region, context);
|
||||
}
|
||||
|
||||
@Command(
|
||||
name = "/test",
|
||||
desc = "test region"
|
||||
)
|
||||
@CommandPermissions("worldedit.region.test")
|
||||
@Logging(REGION)
|
||||
public void test(World world, Player player, EditSession editSession,
|
||||
@Selection Region region,
|
||||
@Arg(desc = "The pattern of blocks to set")
|
||||
Pattern pattern, InjectedValueAccess context) throws WorldEditException {
|
||||
editSession.addProcessor(new ChunkSendProcessor(world, () -> Stream.of(player)));
|
||||
editSession.addProcessor(NullProcessor.INSTANCE);
|
||||
editSession.setBlocks(region, pattern);
|
||||
}
|
||||
|
||||
@Command(
|
||||
name = "/fixlighting",
|
||||
desc = "Get the light at a position"
|
||||
@ -267,7 +301,7 @@ public class RegionCommands {
|
||||
|
||||
@Command(
|
||||
name = "/replace",
|
||||
aliases = { "/re", "/rep", "/r" },
|
||||
aliases = { "/repl", "/rep" },
|
||||
desc = "Replace all blocks in the selection with another"
|
||||
)
|
||||
@CommandPermissions("worldedit.region.replace")
|
||||
@ -459,6 +493,7 @@ public class RegionCommands {
|
||||
|
||||
@Command(
|
||||
name = "/move",
|
||||
aliases = {"/mv"},
|
||||
desc = "Move the contents of the selection"
|
||||
)
|
||||
@CommandPermissions("worldedit.region.move")
|
||||
|
Reference in New Issue
Block a user