From 2719308ada1b59106ecf6c71a87a3a860361b2f5 Mon Sep 17 00:00:00 2001 From: Wizjany Date: Sat, 29 Oct 2011 13:32:26 -0400 Subject: [PATCH] Made //fast display a different message if the argument matches the current mode --- .../java/com/sk89q/worldedit/commands/GeneralCommands.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/commands/GeneralCommands.java b/src/main/java/com/sk89q/worldedit/commands/GeneralCommands.java index 4802e8f60..45d5015b7 100644 --- a/src/main/java/com/sk89q/worldedit/commands/GeneralCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/GeneralCommands.java @@ -76,7 +76,7 @@ public class GeneralCommands { boolean light = args.hasFlag('f'); String newState = args.getString(0, null); - Boolean dir = newState.equals("on") ? true : newState.equals("off") ? false : null; + Boolean dir = newState == null ? null : newState.equals("on") ? true : newState.equals("off") ? false : null; boolean hadFast = session.hasFastMode(); boolean hadLight = session.hasFastLighting(); @@ -89,7 +89,7 @@ public class GeneralCommands { session.setFastLighting(setLight); } - player.print("Fast mode " + (!setFast ? "disabled." : + player.print("Fast mode " + (setFast == hadFast ? "already " : "") + (!setFast ? "disabled." : ("enabled. You may need to rejoin to see changes" + (setLight ? "and lighting in affected chunks may be wrong." : ".")))); }