mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Added //shift to shift the selection.
This commit is contained in:
parent
3e2a1f5c33
commit
95868514e0
@ -142,6 +142,7 @@ public class WorldEditListener extends PluginListener {
|
|||||||
commands.put("//tool", "[Tool] - Set pickaxe tool (none/tree/info)");
|
commands.put("//tool", "[Tool] - Set pickaxe tool (none/tree/info)");
|
||||||
commands.put("//expand", "[Num] <Dir> - Expands the selection");
|
commands.put("//expand", "[Num] <Dir> - Expands the selection");
|
||||||
commands.put("//contract", "[Num] <Dir> - Contracts the selection");
|
commands.put("//contract", "[Num] <Dir> - Contracts the selection");
|
||||||
|
commands.put("//shift", "[Num] <Dir> - Shift the selection");
|
||||||
commands.put("//rotate", "[Angle] - Rotate the clipboard");
|
commands.put("//rotate", "[Angle] - Rotate the clipboard");
|
||||||
commands.put("//flip", "<Dir> - Flip the clipboard");
|
commands.put("//flip", "<Dir> - Flip the clipboard");
|
||||||
commands.put("//hcyl", "[ID] [Radius] <Height> - Create a vertical hollow cylinder");
|
commands.put("//hcyl", "[ID] [Radius] <Height> - Create a vertical hollow cylinder");
|
||||||
@ -1247,6 +1248,25 @@ public class WorldEditListener extends PluginListener {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// Shift
|
||||||
|
} else if (split[0].equalsIgnoreCase("//shift")) {
|
||||||
|
checkArgs(split, 1, 2, split[0]);
|
||||||
|
Vector dir;
|
||||||
|
int change = Integer.parseInt(split[1]);
|
||||||
|
if (split.length == 3) {
|
||||||
|
dir = getDirection(player, split[2].toLowerCase());
|
||||||
|
} else {
|
||||||
|
dir = getDirection(player, "me");
|
||||||
|
}
|
||||||
|
|
||||||
|
Region region = session.getRegion();
|
||||||
|
region.expand(dir.multiply(change));
|
||||||
|
region.contract(dir.multiply(change));
|
||||||
|
session.learnRegionChanges();
|
||||||
|
player.print("Region shifted.");
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
// Rotate
|
// Rotate
|
||||||
} else if (split[0].equalsIgnoreCase("//rotate")) {
|
} else if (split[0].equalsIgnoreCase("//rotate")) {
|
||||||
checkArgs(split, 1, 1, split[0]);
|
checkArgs(split, 1, 1, split[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user