From be8bb784f8675ac0804b2668f387dbb6eb011197 Mon Sep 17 00:00:00 2001 From: ReneZeidler Date: Sat, 1 Feb 2014 08:30:40 -0800 Subject: [PATCH] Only enable CUI support when the message is valid. Also the check if support isn't already enabled is not really needed, as it will just overwrite the field with the same value. --- src/main/java/com/sk89q/worldedit/LocalSession.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/LocalSession.java b/src/main/java/com/sk89q/worldedit/LocalSession.java index 15b2c3153..4c0ff68d1 100644 --- a/src/main/java/com/sk89q/worldedit/LocalSession.java +++ b/src/main/java/com/sk89q/worldedit/LocalSession.java @@ -605,12 +605,9 @@ public class LocalSession { } public void handleCUIInitializationMessage(String text) { - if(!hasCUISupport()) { - setCUISupport(true); - } - String[] split = text.split("\\|"); if (split.length > 1 && split[0].equalsIgnoreCase("v")) { // enough fields and right message + setCUISupport(true); try { setCUIVersion(Integer.parseInt(split[1])); } catch (NumberFormatException e) {