mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00: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.
This commit is contained in:
parent
c47f50696d
commit
be8bb784f8
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user