mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 10:08:34 +00:00
Add /center commmand
This commit is contained in:
@ -144,6 +144,22 @@ public class RegionCommands {
|
||||
player.print(affected + " block(s) have been overlayed.");
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = { "/center", "/middle" },
|
||||
usage = "<block>",
|
||||
desc = "Set the center block(s)",
|
||||
min = 1,
|
||||
max = 1
|
||||
)
|
||||
public void center(CommandContext args, LocalSession session, LocalPlayer player,
|
||||
EditSession editSession) throws WorldEditException {
|
||||
Pattern pattern = we.getBlockPattern(player, args.getString(0));
|
||||
Region region = session.getSelection(player.getWorld());
|
||||
|
||||
int affected = editSession.center(region, pattern);
|
||||
player.print("Center set ("+ affected + " blocks changed)");
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = { "/naturalize" },
|
||||
usage = "",
|
||||
|
Reference in New Issue
Block a user