Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-10 05:20:04 +01:00
Let the handshake packet refresh the CUI protocol version (it happens that players join with another client before the previous session expires) and also send the current selection when receiving a handshake packet (for when the player joins and the previous session did not expire)
Dieser Commit ist enthalten in:
Ursprung
747de4cab7
Commit
e25e1bfe67
@ -605,13 +605,12 @@ public class LocalSession {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void handleCUIInitializationMessage(String text) {
|
public void handleCUIInitializationMessage(String text) {
|
||||||
if (hasCUISupport()) {
|
if(!hasCUISupport()) {
|
||||||
return;
|
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) {
|
||||||
|
@ -41,5 +41,6 @@ public class CUIChannelListener implements PluginMessageListener {
|
|||||||
LocalSession session = plugin.getSession(player);
|
LocalSession session = plugin.getSession(player);
|
||||||
String text = new String(message, UTF_8_CHARSET);
|
String text = new String(message, UTF_8_CHARSET);
|
||||||
session.handleCUIInitializationMessage(text);
|
session.handleCUIInitializationMessage(text);
|
||||||
|
session.describeCUI(plugin.wrapPlayer(player));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren