Button for viewing content fields on wiki + More tests and fixes

This commit is contained in:
Anuken
2025-10-28 19:33:04 -04:00
parent c06c76d296
commit 3d4b432540
7 changed files with 96 additions and 2 deletions

View File

@@ -448,7 +448,7 @@ public class ContentParser{
T two = (T)Vars.content.getByName(ctype, jsonData.asString());
if(two != null) return two;
throw new IllegalArgumentException("\"" + jsonData.name + "\": No " + ctype + " found with name '" + jsonData.asString() + "'.\nMake sure '" + jsonData.asString() + "' is spelled correctly, and that it really exists!\nThis may also occur because its file failed to parse.");
throw new IllegalArgumentException((jsonData.name == null ? "" : "\"" + jsonData.name + "\": ") + "No " + ctype + " found with name '" + jsonData.asString() + "'.\nMake sure '" + jsonData.asString() + "' is spelled correctly, and that it really exists!\nThis may also occur because its file failed to parse.");
}
}