Remove chat-based WECUI protocol. Everybody running a modern (1.2.5 or newer) WECUI should be fine.
This has a bonus of allowing us to stay far far away from that smelly PlayerChatEvent guy who's always late (or early, or both).
This commit is contained in:
@@ -602,6 +602,22 @@ public class LocalSession {
|
||||
}
|
||||
}
|
||||
|
||||
public void handleCUIInitializationMessage(String text) {
|
||||
if (hasCUISupport()) {
|
||||
return;
|
||||
}
|
||||
|
||||
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) {
|
||||
WorldEdit.logger.warning("Error while reading CUI init message: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the status of CUI support.
|
||||
*
|
||||
@@ -617,7 +633,7 @@ public class LocalSession {
|
||||
* @param support
|
||||
*/
|
||||
public void setCUISupport(boolean support) {
|
||||
hasCUISupport = true;
|
||||
hasCUISupport = support;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user