mirror of
https://github.com/NEZNAMY/TAB.git
synced 2026-11-26 10:29:49 -05:00
fixed class cast
This commit is contained in:
1 parent
1a935058ef
commit
10827ffec9
1 file changed
+1
-1
@@ -230,7 +230,7 @@ public class IChatBaseComponent {
|
||||
JSONObject jsonObject = ((JSONObject) new JSONParser().parse(json));
|
||||
IChatBaseComponent component = new IChatBaseComponent();
|
||||
component.setText((String) jsonObject.get("text"));
|
||||
component.setBold((Boolean) jsonObject.get("bold"));
|
||||
if (jsonObject.containsKey("bold")) component.setBold(Boolean.parseBoolean((String) jsonObject.get("bold")));
|
||||
component.setItalic((Boolean) jsonObject.get("italic"));
|
||||
component.setUnderlined((Boolean) jsonObject.get("underlined"));
|
||||
component.setStrikethrough((Boolean) jsonObject.get("strikethrough"));
|
||||
|
||||
Reference in new issue
Block a user