3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 02:50:06 +01:00

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.
Dieser Commit ist enthalten in:
ReneZeidler 2014-02-01 08:30:40 -08:00
Ursprung c47f50696d
Commit be8bb784f8

Datei anzeigen

@ -605,12 +605,9 @@ public class LocalSession {
} }
public void handleCUIInitializationMessage(String text) { public void handleCUIInitializationMessage(String text) {
if(!hasCUISupport()) {
setCUISupport(true);
}
String[] split = text.split("\\|"); String[] split = text.split("\\|");
if (split.length > 1 && split[0].equalsIgnoreCase("v")) { // enough fields and right message if (split.length > 1 && split[0].equalsIgnoreCase("v")) { // enough fields and right message
setCUISupport(true);
try { try {
setCUIVersion(Integer.parseInt(split[1])); setCUIVersion(Integer.parseInt(split[1]));
} catch (NumberFormatException e) { } catch (NumberFormatException e) {