{"id":23625104,"url":"https://github.com/defective4/jchatlib","last_synced_at":"2026-02-14T05:35:29.498Z","repository":{"id":268773746,"uuid":"905417540","full_name":"Defective4/jChatLib","owner":"Defective4","description":"A Minecraft NBT and text component parser library","archived":false,"fork":false,"pushed_at":"2025-03-29T19:02:34.000Z","size":50,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-21T19:43:29.983Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Defective4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-18T19:32:45.000Z","updated_at":"2025-03-29T19:02:38.000Z","dependencies_parsed_at":"2024-12-18T21:19:17.973Z","dependency_job_id":"d00707ce-7e19-43fa-ac82-012acb45ca16","html_url":"https://github.com/Defective4/jChatLib","commit_stats":null,"previous_names":["defective4/jchatlib"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Defective4/jChatLib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Defective4%2FjChatLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Defective4%2FjChatLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Defective4%2FjChatLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Defective4%2FjChatLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Defective4","download_url":"https://codeload.github.com/Defective4/jChatLib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Defective4%2FjChatLib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29438609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T05:24:35.651Z","status":"ssl_error","status_checked_at":"2026-02-14T05:24:34.830Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-27T21:21:21.736Z","updated_at":"2026-02-14T05:35:29.486Z","avatar_url":"https://github.com/Defective4.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jChatLib\n\njChatLib is a minimal Minecraft chat component **and** NBT parser library.  \nIt allows you to parse and encode NBT with both named and unnamed root tags, used in Minecraft's files and sent over network.\nIt also lets you parse text components, both from JSON and NBT!\nThe library is still under development, new features and improvement, as well as proper documentation are planned.\n\n## Features\n- **Complete** - supports all standard NBT data types\n- **Flexible** - Allows parsing text components both from JSON and NBT, making it compatible with **all** Minecraft versions!\n- **Simple to use**\n\n## Installation\nAdd\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.defective4.minecraft\u003c/groupId\u003e\n    \u003cartifactId\u003ejchatlib\u003c/artifactId\u003e\n    \u003cversion\u003e1.1.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\nto your `pom.xml`'s dependencies section\n\n## Usage\n\nParsing chat components from JSON:\n```java\nString json = \"{\\\"text\\\": \\\"Hello \\\", \\\"extra\\\": [\\\"World\\\", {\\\"text\\\": \\\"!\\\"}]}\";\nJsonElement parsed = JsonParser.parseString(json);\nChatComponent component = ChatComponent.fromJson(parsed);\nSystem.out.println(component.toPlainString()); // Outputs \"Hello World!\"\n```\n\nParsing NBT from file:\n```java\nTag nbt;\ntry(InputStream is = new FileInputStream(\"Hello_world.nbt\")) {\n    //                  v----- Read root tag name\n    nbt = NBT.parse(is, true, false);\n    //                        ^----- (don't) use GZIP compression \n} catch(Exception e) {\n    e.printStackTrace();\n    return;\n}\nSystem.out.println(nbt);\n```\n\nParsing text components from NBT:\n```java\nInputStream in = ...\nTag tag = NBT.parse(in, false, false);\nChatComponent component = ChatComponent.fromNBT(tag);\nSystem.out.println(component.toPlainString());\n```\n\nCreating a NBT file:\n```java\ntry (OutputStream os = new FileOutputStream(\"test.nbt\") {\n    CompoundTag root = new CompoundTag(\"root\");\n    \n    //                             v----- Tag name\n    StringTag text = new StringTag(\"text\", \"Hello world!\");\n    //                                      ^----- Tag value\n\n    root.add(text);        //      v--------- (don't) use network format\n    byte[] data = NBT.encode(root, false);\n    os.write(data);\n}","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefective4%2Fjchatlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefective4%2Fjchatlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefective4%2Fjchatlib/lists"}