{"id":15442154,"url":"https://github.com/arthurfiorette/sink-library","last_synced_at":"2025-03-03T00:32:07.149Z","repository":{"id":37898444,"uuid":"320349959","full_name":"arthurfiorette/sink-library","owner":"arthurfiorette","description":"🌊 A powerful and high-performance tool for building spigot plugins.","archived":true,"fork":false,"pushed_at":"2023-02-22T18:11:07.000Z","size":6220,"stargazers_count":6,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T03:06:40.939Z","etag":null,"topics":["bukkit","bukkit-plugin","java","library","minecraft","sink","spigot","spigot-library","spigot-mc","spigot-plugin-api"],"latest_commit_sha":null,"homepage":"https://arthurfiorette.github.io/sink-library/","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/arthurfiorette.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-10T17:58:33.000Z","updated_at":"2025-02-21T22:20:30.000Z","dependencies_parsed_at":"2023-02-08T19:45:57.669Z","dependency_job_id":null,"html_url":"https://github.com/arthurfiorette/sink-library","commit_stats":null,"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurfiorette%2Fsink-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurfiorette%2Fsink-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurfiorette%2Fsink-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurfiorette%2Fsink-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arthurfiorette","download_url":"https://codeload.github.com/arthurfiorette/sink-library/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241587784,"owners_count":19986628,"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":["bukkit","bukkit-plugin","java","library","minecraft","sink","spigot","spigot-library","spigot-mc","spigot-plugin-api"],"created_at":"2024-10-01T19:25:31.088Z","updated_at":"2025-03-03T00:32:06.444Z","avatar_url":"https://github.com/arthurfiorette.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cpre\u003e\n  \u003cbr /\u003e\n  \u003ch1\u003e💧⚡🌊\nSink Library\u003c/h1\u003e\n  \u003cbr /\u003e\n  \u003c/pre\u003e\n  \u003cbr /\u003e\n  \u003cbr /\u003e\n  \u003ccode\n    \u003e\u003ca href=\"https://github.com/ArthurFiorette/sink-library/network/members\"\n      \u003e\u003cimg\n        src=\"https://img.shields.io/github/forks/ArthurFiorette/sink-library?logo=github\u0026label=Forks\"\n        target=\"_blank\"\n        alt=\"Forks\" /\u003e\u003c/a\n  \u003e\u003c/code\u003e\n  \u003ccode\n    \u003e\u003ca href=\"https://github.com/ArthurFiorette/sink-library/issues\"\n      \u003e\u003cimg\n        src=\"https://img.shields.io/github/issues/ArthurFiorette/sink-library?logo=github\u0026label=Issues\"\n        target=\"_blank\"\n        alt=\"Issues\" /\u003e\u003c/a\n  \u003e\u003c/code\u003e\n  \u003ccode\n    \u003e\u003ca href=\"https://github.com/ArthurFiorette/sink-library/stargazers\"\n      \u003e\u003cimg\n        src=\"https://img.shields.io/github/stars/ArthurFiorette/sink-library?logo=github\u0026label=Stars\"\n        target=\"_blank\"\n        alt=\"Stars\" /\u003e\u003c/a\n  \u003e\u003c/code\u003e\n  \u003ccode\n    \u003e\u003ca href=\"https://github.com/ArthurFiorette/sink-library/blob/main/LICENSE\"\n      \u003e\u003cimg\n        src=\"https://img.shields.io/github/license/ArthurFiorette/sink-library?logo=githu\u0026label=License\"\n        target=\"_blank\"\n        alt=\"License\" /\u003e\u003c/a\n  \u003e\u003c/code\u003e\n  \u003ccode\n    \u003e\u003ca href=\"https://jitpack.io/#ArthurFiorette/sink-library\"\n      \u003e\u003cimg\n        src=\"https://jitpack.io/v/ArthurFiorette/sink-library.svg\"\n        target=\"_blank\"\n        alt=\"Jitpack\" /\u003e\u003c/a\n  \u003e\u003c/code\u003e\n    \u003ccode\n    \u003e\u003ca href=\"https://actions-badge.atrox.dev/ArthurFiorette/sink-library/goto?ref=main\"\n      \u003e\u003cimg\n        src=\"https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FArthurFiorette%2Fsink-library%2Fbadge%3Fref%3Dmain\u0026style=flat\u0026label=Actions\u0026logo=none\"\n        target=\"_blank\"\n        alt=\"Github Actions\" /\u003e\u003c/a\n  \u003e\u003c/code\u003e\n\u003c/div\u003e\n\n#\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\u003cb\u003e\u003cpre\u003eUntil v5, possibly, we will have more major breaking changes. Update it carefully.\u003c/pre\u003e\u003c/b\u003e\u003c/div\u003e\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n#### `Sink-library` is a powerful and high-performance tool for building spigot plugins.\n\n\u003cbr /\u003e\n\n```java\n// /docs/examples/ReadmeExample.java\n\npublic class ReadmeExample extends SinkPlugin {\n\n  @Override\n  public ComponentLoader[] components() {\n    // A helper method to create a component loader array based on reflection\n    // Can be written as `new ComponentLoader[] { () -\u003e new MyListener(this) }`\n    return reflect(this, MyListener.class);\n  }\n}\n\n// A simple class to be our listener\nclass MyListener implements SinkListener {\n\n  // Getters and Setters...\n\n  @EventHandler\n  public void onPlayerJoin(final PlayerJoinEvent event) {\n    // On every player join event, get the player and send a message\n    event.getPlayer().sendMessage(\"Hello World!\");\n  }\n}\n\n```\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n### Installing\n\nThis library is hosted by **[JitPack](https://jitpack.io/#ArthurFiorette/sink-library)**.\n\n\u003e Replace `VERSION` with the latest\n\u003e [Github](https://github.com/ArthurFiorette/sink-library/releases) release.\n\n```xml\n\u003c!-- Maven --\u003e\n\u003crepositories\u003e\n  \u003crepository\u003e\n    \u003cid\u003ejitpack.io\u003c/id\u003e\n    \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n  \u003c/repository\u003e\n\u003c/repositories\u003e\n\n\u003cdependencies\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.ArthurFiorette\u003c/groupId\u003e\n    \u003cartifactId\u003esink-library\u003c/artifactId\u003e\n    \u003cversion\u003eVERSION\u003c/version\u003e\n  \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n```gradle\n// Gradle\nallprojects {\n  repositories {\n    maven { url 'https://jitpack.io' }\n  }\n}\n\ndependencies {\n  implementation 'com.github.ArthurFiorette:sink-library:VERSION'\n}\n```\n\n\u003cbr /\u003e\n\n### Documentation\n\nWhile the documentation is not done, you can look at the [examples](/docs/examples), the\n**inline documentation** present or our generated\n[javadoc](https://arthurfiorette.github.io/sink-library/).\n\n\u003cbr /\u003e\n\n### Commons problems\n\n#### `GenericComponentException`\n\nThis exception is thrown when you try to register a component or service, in your class\nthat extends SinkPlugin, which is generic. Since the ComponentManager manages its objects\nwith the key being their classes, two classes with different generic types would be\nrecognized as the same component.\n\nHere is an example of how to solve this problem with this simple component\n\n```java\npublic class MyGenericClass\u003cT\u003e implements BaseComponent {\n  ...\n}\n```\n\nCreate a new class that extends the designed class with the correct type\n\n```java\npublic class MyStringClass extends MyGenericClass\u003cString\u003e {}\n\n```\n\nAnd then you can register the `MyStringClass` normally.\n\n\u003cbr /\u003e\n\n### Help needed.\n\nIf you are willing to contribute in any manner. Checking out this list can be helpful\n\n- **Documentation** _(Urgent haha)_\n- **English revision.** _(My english is really bad)_\n- **Testing this code under other spigot versions**\n\n\u003cbr /\u003e\n\n### License\n\nLicensed under the **MIT**. See [`LICENSE`](LICENSE) for more informations.\n\n\u003cbr /\u003e\n\n### Contact\n\nSee my contact information on my [github profile](https://github.com/ArthurFiorette) or\nopen a new issue.\n\n\u003cbr /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurfiorette%2Fsink-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farthurfiorette%2Fsink-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurfiorette%2Fsink-library/lists"}