{"id":22023399,"url":"https://github.com/nea89o/bukkitcoroutines","last_synced_at":"2025-10-06T00:34:19.583Z","repository":{"id":57736819,"uuid":"419890531","full_name":"nea89o/bukkitcoroutines","owner":"nea89o","description":null,"archived":false,"fork":false,"pushed_at":"2021-10-28T22:55:14.000Z","size":277,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T00:31:47.543Z","etag":null,"topics":["bukkit","coroutines","hacktoberfest","kotlin"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/nea89o.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}},"created_at":"2021-10-21T22:08:03.000Z","updated_at":"2021-10-29T14:25:50.000Z","dependencies_parsed_at":"2022-08-24T14:57:22.407Z","dependency_job_id":null,"html_url":"https://github.com/nea89o/bukkitcoroutines","commit_stats":null,"previous_names":["nea89o/bukkitcoroutines"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nea89o%2Fbukkitcoroutines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nea89o%2Fbukkitcoroutines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nea89o%2Fbukkitcoroutines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nea89o%2Fbukkitcoroutines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nea89o","download_url":"https://codeload.github.com/nea89o/bukkitcoroutines/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245090911,"owners_count":20559296,"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","coroutines","hacktoberfest","kotlin"],"created_at":"2024-11-30T06:42:16.676Z","updated_at":"2025-10-06T00:34:19.509Z","avatar_url":"https://github.com/nea89o.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Bukkit Kotlin Coroutines\n\nInteract with the bukkit scheduler in a very kotlin-y way:\n\n```kotlin\n@SpigotPlugin\nclass TestPlugin : JavaPlugin() {\n    @OptIn(ExperimentalTime::class)\n    override fun onEnable() {\n        logger.info(\"OnEnable | is primary thread: ${Bukkit.isPrimaryThread()}\")\n        startCoroutineOnSameThread {\n            logger.info(\"Started Coroutine | is primary thread: ${Bukkit.isPrimaryThread()}\")\n            switchToAsync()\n            logger.info(\"After switchToAsync | is primary thread: ${Bukkit.isPrimaryThread()}\")\n            waitAndContinueInSameThread(Duration.seconds(3))\n            logger.info(\"After wait | is primary thread: ${Bukkit.isPrimaryThread()}\")\n            switchToMain()\n            logger.info(\"After switchToMain | is primary thread: ${Bukkit.isPrimaryThread()}\")\n        }\n    }\n}\n```\n\nwould produce the following output:\n\n```log\n[23:21:38 INFO]: [bukkitcoroutines] Loading bukkitcoroutines v1.0.0\n[23:21:42 INFO]: [bukkitcoroutines] Enabling bukkitcoroutines v1.0.0*\n[23:21:42 INFO]: [bukkitcoroutines] OnEnable | is primary thread: true\n[23:21:42 INFO]: [bukkitcoroutines] Started Coroutine | is primary thread: true\n[23:21:42 INFO]: [bukkitcoroutines] After switchToAsync | is primary thread: false\n[23:21:45 INFO]: [bukkitcoroutines] After wait | is primary thread: false\n[23:21:45 INFO]: [bukkitcoroutines] After switchToMain | is primary thread: true\n```\n\n## Documentation\n\nJavadoc is available\non [Github Pages](https://romangraef.github.io/bukkitcoroutines/bukkitcoroutines/moe.nea89.bukkitcoroutines/index.html)\n\n## Installation\n\nThis code should be shaded into your plugin: ![[https://search.maven.org/artifact/moe.nea89/bukkitcoroutines](https://search.maven.org/artifact/moe.nea89/bukkitcoroutines)](https://img.shields.io/maven-central/v/moe.nea89/bukkitcoroutines)\n\n```kotlin\nimplementation(\"moe.nea89:bukkitcoroutines:1.0.0\")\n\n// If you want to be compatible with other plugins, make sure to relocate us:\n\nshadowJar.relocate(\"moe.nea89.bukkitcoroutines\", \"yourpluginid.relocated.bukkitcoroutines\")\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnea89o%2Fbukkitcoroutines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnea89o%2Fbukkitcoroutines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnea89o%2Fbukkitcoroutines/lists"}