mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 03:56:41 +00:00
Various
fake chunk packet aliases cfi wip
This commit is contained in:
@ -540,6 +540,7 @@ public class ClipboardCommands {
|
||||
|
||||
@Command(
|
||||
name = "/rotate",
|
||||
aliases = {"/rt"},
|
||||
desc = "Rotate the contents of the clipboard",
|
||||
descFooter = "Non-destructively rotate the contents of the clipboard.\n" +
|
||||
"Angles are provided in degrees and a positive angle will result in a clockwise rotation. " +
|
||||
|
@ -219,8 +219,8 @@ public class HistoryCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
name = "undo",
|
||||
aliases = { "/undo" },
|
||||
name = "/undo",
|
||||
aliases = { "/un", "/ud", "undo" },
|
||||
desc = "Undoes the last action (from history)"
|
||||
)
|
||||
@CommandPermissions({"worldedit.history.undo", "worldedit.history.undo.self"})
|
||||
@ -266,8 +266,8 @@ public class HistoryCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
name = "redo",
|
||||
aliases = { "/redo" },
|
||||
name = "/redo",
|
||||
aliases = { "/do", "/rd", "redo" },
|
||||
desc = "Redoes the last action (from history)"
|
||||
)
|
||||
@CommandPermissions({"worldedit.history.redo", "worldedit.history.redo.self"})
|
||||
|
@ -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.ChunkSendProcessor;
|
||||
import com.boydti.fawe.beta.implementation.NullProcessor;
|
||||
import com.boydti.fawe.config.BBC;
|
||||
import com.boydti.fawe.object.FaweLimit;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
@ -74,8 +76,13 @@ import com.sk89q.worldedit.world.World;
|
||||
import com.sk89q.worldedit.world.biome.BiomeType;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
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 +109,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 +142,22 @@ 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);
|
||||
System.out.println("Done");
|
||||
}
|
||||
|
||||
@Command(
|
||||
name = "/fixlighting",
|
||||
desc = "Get the light at a position"
|
||||
@ -267,7 +304,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 +496,7 @@ public class RegionCommands {
|
||||
|
||||
@Command(
|
||||
name = "/move",
|
||||
aliases = {"/mv"},
|
||||
desc = "Move the contents of the selection"
|
||||
)
|
||||
@CommandPermissions("worldedit.region.move")
|
||||
|
@ -194,8 +194,8 @@ public class ToolUtilCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
name = "/",
|
||||
aliases = {","},
|
||||
name = "/superpickaxe",
|
||||
aliases = {",", "sp", "/sp", "superpickaxe", "/pickaxe"},
|
||||
desc = "Toggle the super pickaxe function"
|
||||
)
|
||||
@CommandPermissions("worldedit.superpickaxe")
|
||||
|
@ -421,7 +421,7 @@ public class UtilityCommands {
|
||||
|
||||
@Command(
|
||||
name = "replacenear",
|
||||
aliases = { "/replacenear" },
|
||||
aliases = { "/replacenear", "/rn" },
|
||||
desc = "Replace nearby blocks"
|
||||
)
|
||||
@CommandPermissions("worldedit.replacenear")
|
||||
|
Reference in New Issue
Block a user