From d198961e1223d6093d3b73b8c83d53d666a0c6b1 Mon Sep 17 00:00:00 2001 From: sk89q Date: Sat, 3 Nov 2012 12:58:04 -0700 Subject: [PATCH] Updated for 5.4.5. --- CHANGELOG.txt | 3 +++ .../sk89q/worldedit/commands/RegionCommands.java | 13 +++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b1837b007..b738129fb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,6 @@ +5.4.5: +- Fixed minor check issue with //center. + 5.4.4: - Added official support for Minecraft 1.4. - Added support for 4096 ID blocks (theoretically) in snapshots. diff --git a/src/main/java/com/sk89q/worldedit/commands/RegionCommands.java b/src/main/java/com/sk89q/worldedit/commands/RegionCommands.java index 64a6cf5f6..b77bd1b50 100644 --- a/src/main/java/com/sk89q/worldedit/commands/RegionCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/RegionCommands.java @@ -49,12 +49,12 @@ import com.sk89q.worldedit.regions.RegionOperationException; /** * Region related commands. - * + * * @author sk89q */ public class RegionCommands { private final WorldEdit we; - + public RegionCommands(WorldEdit we) { this.we = we; } @@ -97,7 +97,7 @@ public class RegionCommands { @Logging(REGION) public void replace(CommandContext args, LocalSession session, LocalPlayer player, EditSession editSession) throws WorldEditException { - + Set from; Pattern to; if (args.argsLength() == 1) { @@ -151,6 +151,7 @@ public class RegionCommands { min = 1, max = 1 ) + @CommandPermissions("worldedit.region.center") public void center(CommandContext args, LocalSession session, LocalPlayer player, EditSession editSession) throws WorldEditException { Pattern pattern = we.getBlockPattern(player, args.getString(0)); @@ -211,7 +212,7 @@ public class RegionCommands { @Logging(REGION) public void faces(CommandContext args, LocalSession session, LocalPlayer player, EditSession editSession) throws WorldEditException { - + Pattern pattern = we.getBlockPattern(player, args.getString(0)); int affected; if (pattern instanceof SingleBlockPattern) { @@ -238,7 +239,7 @@ public class RegionCommands { @Logging(REGION) public void smooth(CommandContext args, LocalSession session, LocalPlayer player, EditSession editSession) throws WorldEditException { - + int iterations = 1; if (args.argsLength() > 0) { iterations = args.getInteger(0); @@ -356,7 +357,7 @@ public class RegionCommands { @Logging(REGION) public void regenerateChunk(CommandContext args, LocalSession session, LocalPlayer player, EditSession editSession) throws WorldEditException { - + Region region = session.getSelection(player.getWorld()); Mask mask = session.getMask(); session.setMask(null);