mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Added //chunk to select a chunk.
This commit is contained in:
parent
19f7456c51
commit
162fd11d40
@ -119,6 +119,7 @@ public class WorldEditListener extends PluginListener {
|
|||||||
commands.put("//pos2", "Set editing position #2");
|
commands.put("//pos2", "Set editing position #2");
|
||||||
commands.put("//hpos1", "Trace editing position #1");
|
commands.put("//hpos1", "Trace editing position #1");
|
||||||
commands.put("//hpos2", "Trace editing position #2");
|
commands.put("//hpos2", "Trace editing position #2");
|
||||||
|
commands.put("//chunk", "Select the chunk that you are in");
|
||||||
commands.put("/toggleplace", "Toggle placing at pos #1");
|
commands.put("/toggleplace", "Toggle placing at pos #1");
|
||||||
commands.put("//wand", "Gives you the \"edit wand\"");
|
commands.put("//wand", "Gives you the \"edit wand\"");
|
||||||
commands.put("/toggleeditwand", "Toggles edit wand selection");
|
commands.put("/toggleeditwand", "Toggles edit wand selection");
|
||||||
@ -494,6 +495,22 @@ public class WorldEditListener extends PluginListener {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// Select the chunk
|
||||||
|
} else if(split[0].equalsIgnoreCase("//chunk")) {
|
||||||
|
checkArgs(split, 0, 0, split[0]);
|
||||||
|
|
||||||
|
Vector2D min2D = ChunkStore.toChunk(player.getBlockIn());
|
||||||
|
Vector min = new Vector(min2D.getBlockX() * 16, 0, min2D.getBlockZ() * 16);
|
||||||
|
Vector max = min.add(15, 127, 15);
|
||||||
|
|
||||||
|
session.setPos1(min);
|
||||||
|
session.setPos2(max);
|
||||||
|
|
||||||
|
player.print("Chunk selected: "
|
||||||
|
+ min2D.getBlockX() + ", " + min2D.getBlockZ());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
// Edit wand
|
// Edit wand
|
||||||
} else if (split[0].equalsIgnoreCase("//wand")) {
|
} else if (split[0].equalsIgnoreCase("//wand")) {
|
||||||
checkArgs(split, 0, 0, split[0]);
|
checkArgs(split, 0, 0, split[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user