{"id":19653281,"url":"https://github.com/florianmichael/classic4j","last_synced_at":"2025-12-28T20:58:19.351Z","repository":{"id":153992966,"uuid":"631124530","full_name":"FlorianMichael/Classic4J","owner":"FlorianMichael","description":"Java implementation of the ClassiCube and BetaCraft protocol","archived":false,"fork":false,"pushed_at":"2024-09-15T07:51:46.000Z","size":334,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-15T10:48:42.035Z","etag":null,"topics":["alpha","beta","betacraft","classic","classicube","minecraft","serverlist","viafabricplus","viaproxy","viaversion"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FlorianMichael.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"FlorianMichael","custom":["https://florianmichael.de/donate"]}},"created_at":"2023-04-22T02:28:14.000Z","updated_at":"2024-09-15T07:51:47.000Z","dependencies_parsed_at":"2023-11-18T23:23:19.823Z","dependency_job_id":"4b84b3d3-f3e8-4502-8b38-28355bee1d19","html_url":"https://github.com/FlorianMichael/Classic4J","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlorianMichael%2FClassic4J","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlorianMichael%2FClassic4J/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlorianMichael%2FClassic4J/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlorianMichael%2FClassic4J/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FlorianMichael","download_url":"https://codeload.github.com/FlorianMichael/Classic4J/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224124788,"owners_count":17259746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["alpha","beta","betacraft","classic","classicube","minecraft","serverlist","viafabricplus","viaproxy","viaversion"],"created_at":"2024-11-11T15:13:44.827Z","updated_at":"2025-12-28T20:58:19.342Z","avatar_url":"https://github.com/FlorianMichael.png","language":"Java","funding_links":["https://github.com/sponsors/FlorianMichael","https://florianmichael.de/donate"],"categories":[],"sub_categories":[],"readme":"# Classic4J\nJava implementation of the ClassiCube and BetaCraft protocol\n\n## Contact\nIf you encounter any issues, please report them on the\n[issue tracker](https://github.com/FlorianMichael/Classic4J/issues).  \nIf you just want to talk or need help with Classic4J feel free to join my\n[Discord](https://florianmichael.de/discord).\n\n## How to add this to your project\n### Gradle/Maven\n\nTo use Classic4J with Gradle/Maven you can\nuse [the Maven Central repository](https://mvnrepository.com/artifact/de.florianmichael/Classic4J)\nor [my own repository](https://maven.florianmichael.de/#/releases/de/florianmichael/Classic4J).  \nYou can also find instructions how to implement it into your build script there.\n\n### Jar File\n\nIf you just want the latest jar file you can download it\nfrom [my build server](https://build.florianmichael.de/job/Classic4J), [GitHub Actions](https://github.com/FlorianMichael/Classic4J/actions)\nor use the [releases tab](https://github.com/FlorianMichael/Classic4J/releases).\n\n### Requirements\nThis library requires you to have [Gson](https://mvnrepository.com/artifact/com.google.code.gson/gson/2.10.1) in your class path. \u003cbr\u003e\nThe **minimum** Java version is Java **17**.\n\n### Projects implementing Classic4J\n1. [ViaFabricPlus](https://github.com/FlorianMichael/ViaFabricPlus): Fabric mod to connect to EVERY Minecraft server version (Release, Beta, Alpha, Classic, Snapshots, Bedrock) with QoL fixes to the gameplay\n\n## Structure\nThe two main classes of the library are **BetaCraftHandler** and **ClassiCubeHandler**, where you can get API requests for the respective platforms.\n\nAll API Requests are asynchronous and require a callback, the callback is called on the main thread, so you can safely modify the UI in the callback. \nThey are located in the **de.florianmichael.classic4j.request** package.\n\nAll Models are located in the **de.florianmichael.classic4j.model** and **de.florianmichael.classic4j.api** package.\n\nThe internal API is located in the **de.florianmichael.classic4j.util** package. \n\n**You can either use the high-level frontend for API requests using the Handler classes or use the low-level backend using the Request classes.**\n\n## Example usage\n### BetaCraft\nClassic4J allows you to dump the server list from https://betacraft.uk/ and generate an MP Pass from the BetaCraft launcher, keep in mind that for the MP Pass generator you need to implement the ExternalInterface from above\n```java\nBetaCraftHandler.requestServerList(serverList -\u003e {\n    System.out.println(serverList.servers().size());\n    System.out.println(serverList.serversOfVersion(BCVersion.ALPHA).size());\n    System.out.println(serverList.serversWithOnlineMode(false)); // offline mode\n});\n\n// You can authenticate to a BetaCraft server by doing:\nBetaCrafthandler.authenticate(serverId -\u003e {\n    // You have to call the joinServer Statement in here     \n});\n```\n\n### ClassiCube\nClassic4J allows you to authenticate with ClassiCube and retrieve the server list\n```java\nfinal CCAccount account = new CCAccount(\"\u003cusername\u003e\", \"\u003cpassowrd\u003e\");\nClassiCubeHandler.requestAuthentication(account, null, new LoginProcessHandler() {\n    @Override\n    public void handleMfa(CCAccount account) {\n        // Called when the account requires to be verified via MFA\n        // If this is the case, you can call the authenticate method again and specify the MFA code instead of null\n    }\n\n    @Override\n    public void handleSuccessfulLogin(CCAccount account) {\n        // Called when the login was successfully\n    }\n\n    @Override\n    public void handleException(Throwable throwable) {\n        // Called when something went wrong\n    }\n});\n```\nOnce you are authenticated, you can then dump the server list like BetaCraft, other API requests like searching are also implemented\n```java\nClassiCubeHandler.requestServerList(account, serverList -\u003e {\n    System.out.println(serverList.servers().size());\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorianmichael%2Fclassic4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflorianmichael%2Fclassic4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorianmichael%2Fclassic4j/lists"}