mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-25 01:49:49 -05:00
Fix assetJson util
Former-commit-id: 089c553c6f4a0dde6163869e75a928e4d7f7467b
This commit is contained in:
1 parent
d8f606f397
commit
0368da392f
1 file changed
+2
@@ -38,6 +38,7 @@ public class AssetJson {
|
||||
|
||||
@Nullable
|
||||
public String getLanguageHash(@NotNull String languageCode) {
|
||||
languageCode = languageCode.replace("-","_").toLowerCase().trim();
|
||||
JsonObject json = new JsonParser().parse(this.gameAssets).getAsJsonObject();
|
||||
if (json == null || json.isJsonNull()) {
|
||||
Util.debugLog("Cannot parse the json: " + this.gameAssets);
|
||||
@@ -56,6 +57,7 @@ public class AssetJson {
|
||||
JsonObject langObj = objs.getAsJsonObject(MsgUtil.fillArgs(pathTemplate, languageCode));
|
||||
if (langObj == null || langObj.isJsonNull()) {
|
||||
Util.debugLog("Cannot find request path.");
|
||||
Util.debugLog(this.gameAssets);
|
||||
return null;
|
||||
}
|
||||
JsonPrimitive hashObj = langObj.getAsJsonPrimitive("hash");
|
||||
|
||||
Reference in new issue
Block a user