File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/main/java/cn/nukkit/utils Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 33import cn .nukkit .network .encryption .EncryptionUtils ;
44import cn .nukkit .network .protocol .LoginPacket ;
55import com .google .gson .Gson ;
6+ import com .google .gson .JsonElement ;
67import com .google .gson .JsonObject ;
78import com .google .gson .reflect .TypeToken ;
89import com .nimbusds .jose .JWSObject ;
@@ -249,7 +250,11 @@ private void decodeChainData() {
249250 if (extra .has ("displayName" )) this .username = extra .get ("displayName" ).getAsString ();
250251 if (extra .has ("identity" )) this .clientUUID = UUID .fromString (extra .get ("identity" ).getAsString ());
251252 if (extra .has ("XUID" )) this .xuid = extra .get ("XUID" ).getAsString ();
252- if (extra .has ("titleId" )) this .titleId = extra .get ("titleId" ).getAsString ();
253+
254+ JsonElement titleIdElement = extra .get ("titleId" );
255+ if (titleIdElement != null && !titleIdElement .isJsonNull ()) {
256+ this .titleId = titleIdElement .getAsString ();
257+ }
253258 }
254259
255260 if (chainMap .has ("identityPublicKey" )) {
You can’t perform that action at this time.
0 commit comments