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:
zml2008
2012-08-04 20:22:55 -07:00
parent ce20f33425
commit fe445a7ec9
13 changed files with 157 additions and 112 deletions

View File

@@ -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;
}
/**