From 7827dfea9efcd690d37a487d9626db33097a1c40 Mon Sep 17 00:00:00 2001 From: sk89q Date: Thu, 26 Jun 2014 17:43:25 -0700 Subject: [PATCH] Put in a tip about setting //limit. --- .../sk89q/worldedit/command/GeneralCommands.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/command/GeneralCommands.java b/src/main/java/com/sk89q/worldedit/command/GeneralCommands.java index 7f938fcee..285901292 100644 --- a/src/main/java/com/sk89q/worldedit/command/GeneralCommands.java +++ b/src/main/java/com/sk89q/worldedit/command/GeneralCommands.java @@ -57,19 +57,23 @@ public class GeneralCommands { EditSession editSession) throws WorldEditException { LocalConfiguration config = we.getConfiguration(); + boolean mayDisable = player.hasPermission("worldedit.limit.unrestricted"); int limit = Math.max(-1, args.getInteger(0)); - if (!player.hasPermission("worldedit.limit.unrestricted") - && config.maxChangeLimit > -1) { + if (!mayDisable && config.maxChangeLimit > -1) { if (limit > config.maxChangeLimit) { - player.printError("Your maximum allowable limit is " - + config.maxChangeLimit + "."); + player.printError("Your maximum allowable limit is " + config.maxChangeLimit + "."); return; } } session.setBlockChangeLimit(limit); - player.print("Block change limit set to " + limit + "."); + + if (limit != -1) { + player.print("Block change limit set to " + limit + ". (Use //limit -1 to go back to the default.)"); + } else { + player.print("Block change limit set to " + limit + "."); + } } @Command(