Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-03 14:50:30 +01:00
Use length for UUID compat as contains is expensive
Dieser Commit ist enthalten in:
Ursprung
071b42c9e0
Commit
b15c93c416
@ -114,7 +114,8 @@ public class BaseProtocol extends Protocol {
|
||||
info.setState(State.PLAY);
|
||||
// Save other info
|
||||
String stringUUID = wrapper.get(Type.STRING, 0);
|
||||
if (!stringUUID.contains("-")) {
|
||||
if (stringUUID.length() == 28) {
|
||||
// Trimmed
|
||||
stringUUID = stringUUID.replaceAll("(\\w{8})(\\w{4})(\\w{4})(\\w{4})(\\w{12})", "$1-$2-$3-$4-$5");
|
||||
}
|
||||
UUID uuid = UUID.fromString(stringUUID);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren