geforkt von Mirrors/FastAsyncWorldEdit
Keep extending cuboid selector after //cli selectworld
Dieser Commit ist enthalten in:
Ursprung
85214c944f
Commit
3cac28ea84
@ -23,6 +23,7 @@ import com.sk89q.worldedit.LocalSession;
|
|||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
import com.sk89q.worldedit.extension.platform.Actor;
|
import com.sk89q.worldedit.extension.platform.Actor;
|
||||||
import com.sk89q.worldedit.regions.selector.CuboidRegionSelector;
|
import com.sk89q.worldedit.regions.selector.CuboidRegionSelector;
|
||||||
|
import com.sk89q.worldedit.regions.selector.ExtendingCuboidRegionSelector;
|
||||||
import com.sk89q.worldedit.util.formatting.text.TextComponent;
|
import com.sk89q.worldedit.util.formatting.text.TextComponent;
|
||||||
import com.sk89q.worldedit.util.task.Task;
|
import com.sk89q.worldedit.util.task.Task;
|
||||||
import com.sk89q.worldedit.world.World;
|
import com.sk89q.worldedit.world.World;
|
||||||
@ -39,9 +40,12 @@ public class CLIExtraCommands {
|
|||||||
desc = "Select the entire world"
|
desc = "Select the entire world"
|
||||||
)
|
)
|
||||||
public void selectWorld(Actor actor, World world, LocalSession session) {
|
public void selectWorld(Actor actor, World world, LocalSession session) {
|
||||||
session.setRegionSelector(world, new CuboidRegionSelector(
|
final CuboidRegionSelector selector;
|
||||||
world, world.getMinimumPoint(), world.getMaximumPoint()
|
if (session.getRegionSelector(world) instanceof ExtendingCuboidRegionSelector) {
|
||||||
));
|
selector = new ExtendingCuboidRegionSelector(world, world.getMinimumPoint(), world.getMaximumPoint());
|
||||||
|
} else {
|
||||||
|
selector = new CuboidRegionSelector(world, world.getMinimumPoint(), world.getMaximumPoint());
|
||||||
|
}
|
||||||
actor.printInfo(TextComponent.of("Selected the entire world."));
|
actor.printInfo(TextComponent.of("Selected the entire world."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren