{"id":43194722,"url":"https://github.com/bristermitten/mittenlib","last_synced_at":"2026-02-01T05:15:06.851Z","repository":{"id":49326602,"uuid":"420799849","full_name":"bristermitten/mittenlib","owner":"bristermitten","description":"Opinionated, comprehensive collection of libraries \u0026 tools to make Spigot development easier","archived":false,"fork":false,"pushed_at":"2026-01-06T18:23:08.000Z","size":2389,"stargazers_count":3,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T07:52:20.908Z","etag":null,"topics":["java","kotlin","library","spigot","spigot-plugin"],"latest_commit_sha":null,"homepage":"https://bristermitten.github.io/mittenlib/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bristermitten.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-10-24T21:26:27.000Z","updated_at":"2026-01-06T18:23:12.000Z","dependencies_parsed_at":"2025-07-08T11:21:27.183Z","dependency_job_id":"8e0ee374-0ebf-44ab-9c50-39f7b036ac53","html_url":"https://github.com/bristermitten/mittenlib","commit_stats":null,"previous_names":["bristermitten/mittenlib"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bristermitten/mittenlib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bristermitten%2Fmittenlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bristermitten%2Fmittenlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bristermitten%2Fmittenlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bristermitten%2Fmittenlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bristermitten","download_url":"https://codeload.github.com/bristermitten/mittenlib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bristermitten%2Fmittenlib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28969111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T04:44:20.970Z","status":"ssl_error","status_checked_at":"2026-02-01T04:44:19.994Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["java","kotlin","library","spigot","spigot-plugin"],"created_at":"2026-02-01T05:15:06.267Z","updated_at":"2026-02-01T05:15:06.846Z","avatar_url":"https://github.com/bristermitten.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MittenLib\n\n![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo.bristermitten.me%2Fpublic%2Fme%2Fbristermitten%2Fmittenlib-core%2Fmaven-metadata.xml)\n\nA library I use in many of my plugins which provides a wide range of utilities.\n\n[Javadocs](https://knightzmc.github.io/mittenlib/)\n\n## Advantages\n\nMittenLib is different from the common helper frameworks in the Spigot ecosystem in a few ways:\n\n* **Scalability:** MittenLib is strongly based around the [Guice](https://github.com/google/guice/) framework.\n  Using Guice makes MittenLib particularly well-suited for larger scale projects, as it\n  can make structuring large projects much easier.\n* **Extensibility:** MittenLib is highly extensible and modular. By using Guice, different components of the library\n  can be individually enabled or removed. Extra functionality can be added in the same way. Each major\n  part of MittenLib is split into a separate dependency to keep jar sizes as low as possible.\n* **Cross-Version support:** MittenLib supports all Minecraft / Spigot versions including and above 1.8.8\n* **Modernity:** Despite its support for old versions, MittenLib is built around the modern practices in Spigot\n  development: It uses [Adventure](https://docs.adventure.kyori.net/) throughout its internals, and avoids common\n  pitfalls like static abuse as much as possible.\n* **Ease of Use:** MittenLib aims to be as simple as possible, whilst keeping its flexible usage\n\n## Current Module List\n\nModules are generally structured in terms of runtime dependencies\nrather than functionality. If a feature requires an extra dependency,\nit will be placed in a different module to keep jar sizes as low as possible.\n\n### `core`\n\n#### Runtime Dependencies\n\n* [Guice](https://github.com/google/guice/)\n* [Adventure](https://docs.adventure.kyori.net/)\n\nThis module is required in every project using MittenLib.\nIt provides a range of general purpose utilities such as:\n\n* The main entry point into MittenLib, handling Guice bootstrapping\n* `Map.of` / `Set.of` methods for pre-Java 9 projects\n* File handling methods\n* Localization (l18n) utility methods, providing an easy and extensible system for formatting messages and sending them\n  to players\n* Various useful utility classes: String manipulation, Caching, safe Null and Cast handling à-la Kotlin, and more\n* File watching support for automatic reloading of files\n\n### `annotation-processor`\n\n[Full documentation](./annotation-processor/README.md)\n\n#### Runtime Dependencies:\n\nNone\n\nThis module contains an annotation processor that can automatically\ngenerate classes for deserializing complex data structures.\n\nIt is primarily intended for deserializing configuration files,\nbut can be used for reading any file.\n\nThe approach of generating classes has a few powerful advantages over other methods:\n\n* It's fast. Performance will be roughly equivalent to writing the deserialization logic by hand, and much faster than\n  when using something like Gson\n* It ties in nicely with the functions provided in the `core` module. With just a few lines of code you can make an\n  automatically reloading config file with fast parsing and useful error handling\n* Generating source code means the behaviour is more transparent than that-of reflection based frameworks like Gson\n\nFor example, this code:\n\n```java\n\n@Config\n@Source(\"database.yml\")\n@NamingPattern(NamingPattern.LOWER_KEBAB_CASE)\npublic class DatabaseConfigDTO {\n    String hostname;\n    String database;\n    String username;\n    String password;\n    int port;\n\n    @Nullable\n    String tablePrefix;\n}\n```\n\nwill generate a new class `DatabaseConfig` that handles\ndeserialization, reloading, loading from the file `database.yml`, copying, and\nerror handling. `DatabaseConfig`'s can be injected anywhere in your application using Guice.\n\n### `commands`\n\n#### Runtime Dependencies\n\n* [ACF](https://github.com/aikar/commands/)\n\nThis is a fairly small module, lightly wrapping some of the more messy parts of\nACF. This module will likely not be useful to you if you prefer to use a different command framework,\nbut I would recommend using it if you do use ACF.\n\nI do not currently plan to recreate a new command framework, as there are already many good ones\nout there.\n\n### `minimessage`\n\n#### Runtime Dependencies\n\n- [MiniMessage](https://docs.adventure.kyori.net/minimessage/)\n\nThis module adds automatic support for MiniMessage anywhere that Strings are formatted\n(i.e. with `MessageFormatter`)\n\n### `papi`\n\n#### Runtime Dependencies\n\n- [PlaceholderAPI](https://www.spigotmc.org/resources/placeholderapi.6245/) (**not shaded**)\n\nThis module adds automatic support for placeholder application with PlaceholderAPI anywhere that Strings are formatted\n\n### `record-generator`\n\n[Full documentation](./record-generator/README.md)\n\nAn annotation processor that emulates the behaviour of Java 16 Records and Sealed Classes on older Java versions\n\n## How to use it\n\nMittenLib is published to my Maven repository making it easy to access.\nTake the snippets below, replacing `MODULE` with the module(s) you want to use (you will need 1 separate dependency\nper module),\nand replace `VERSION` with the latest version.\n\nNote that the `annotation-processor` module will require a slightly different\nconfiguration.\n\n![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo.bristermitten.me%2Fpublic%2Fme%2Fbristermitten%2Fmittenlib-core%2Fmaven-metadata.xml)\n\n### Maven\n\n```xml\n\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ebristermitten\u003c/id\u003e\n      \u003curl\u003ehttps://repo.bristermitten.me/public/\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\n```xml\n\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eme.bristermitten\u003c/groupId\u003e\n        \u003cartifactId\u003emittenlib-MODULE\u003c/artifactId\u003e\n        \u003cversion\u003eVERSION\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n### Gradle (Kotlin)\n\n```kotlin\nrepositories {\n  maven(\"https://repo.bristermitten.me/public/\")\n}\n\ndependencies {\n  implementation(\"me.bristermitten:mittenlib-$MODULE:$VERSION\")\n}\n```\n\n### Gradle (Groovy)\n\n```groovy\nrepositories {\n    maven {\n      url = 'https://repo.bristermitten.me/public/'\n    }\n}\n\ndependencies {\n  implementation \"me.bristermitten:mittenlib:$MODULE:$VERSION\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbristermitten%2Fmittenlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbristermitten%2Fmittenlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbristermitten%2Fmittenlib/lists"}