{"id":27384036,"url":"https://github.com/noyzys/nautchkafe-countdown","last_synced_at":"2026-04-29T00:33:03.998Z","repository":{"id":287589691,"uuid":"965199011","full_name":"noyzys/nautchkafe-countdown","owner":"noyzys","description":"A flexible and efficient countdown system.","archived":false,"fork":false,"pushed_at":"2026-04-16T11:59:24.000Z","size":52,"stargazers_count":4,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-16T13:35:48.923Z","etag":null,"topics":["api","bukkit","bukkit-api","bukkit-library","framework","java","mockito","simple-framework","spigot","spigot-api","spigot-plugin"],"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/noyzys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2025-04-12T16:23:08.000Z","updated_at":"2026-02-22T10:15:27.000Z","dependencies_parsed_at":"2025-10-28T10:05:33.913Z","dependency_job_id":null,"html_url":"https://github.com/noyzys/nautchkafe-countdown","commit_stats":null,"previous_names":["noyzys/nautchkafe-countdown"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/noyzys/nautchkafe-countdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyzys%2Fnautchkafe-countdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyzys%2Fnautchkafe-countdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyzys%2Fnautchkafe-countdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyzys%2Fnautchkafe-countdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noyzys","download_url":"https://codeload.github.com/noyzys/nautchkafe-countdown/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyzys%2Fnautchkafe-countdown/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32405901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"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":["api","bukkit","bukkit-api","bukkit-library","framework","java","mockito","simple-framework","spigot","spigot-api","spigot-plugin"],"created_at":"2025-04-13T16:17:01.744Z","updated_at":"2026-04-29T00:33:03.993Z","avatar_url":"https://github.com/noyzys.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"                                                # bukkit-countdown \n\n\n**A flexible and efficient countdown system built for Bukkit/Spigot servers.**\n\n- This system allows for customizable, multi-phase countdowns, supporting events such as start, finish, cancel, and close with full event handling and cancellation support.\n\n## Features:\n- Multi-phase countdowns: Support for different phases with individual durations.\n- Event handling: Triggers events like CountdownStartEvent, CountdownFinishEvent, CountdownCancelEvent, and CountdownCloseEvent.\n- Asynchronous Execution: Countdown execution is handled asynchronously to prevent blocking the main server thread.\n- Event-driven architecture: Triggers specific events during the countdown lifecycle to allow for better interaction and flexibility.\n\n## Example use case:\n\n```java\nCountdownTimer countdown = new CountdownTimer(server);\n\nDuration tenSecond = Duration.ofSeconds(10);\nDuration fiveSecond = Duration.ofSeconds(5);\nCountdownAlertMapper\u003cString\u003e alerts = CountdownAlertMapper.fromDurations(Map.of(\n        tenSecond, id -\u003e server.broadcastMessage(\"\u003e 10 seconds to start: \" + id),\n        fiveSecond, id -\u003e server.broadcastMessage(\"\u003e 5 seconds to start: \" + id)\n                                      ));\n\nCountdownPhase prepare = new CountdownPhase(Duration.ofSeconds(15), alerts.toCountdownTicker());\nCountdownPhase active = new CountdownPhase(Duration.ofSeconds(10), (id, sec, tick) -\u003e server.broadcastMessage(\"[\" + id + \"] Game ongoing... Seconds left: \" + sec));\n\ncountdown.startPhasedCountdown(\n    \"countdown-id\",\n    List.of(prepare, active),\n    (id, end) -\u003e server.broadcastMessage(\"\u003e Countdown finished for \" + id),\n    id -\u003e server.broadcastMessage(\"\u003e Countdown cancelled for: \" + id)\n);\n\n```\n## Event driven stack:\n- **CountdownStartEvent** - Triggered when the countdown starts.\n- **CountdownFinishEvent** - Triggered when the countdown finishes successfully all phases have completed).\n- **CountdownCancelEvent** - Triggered when the countdown is canceled before completion.\n- **CountdownCloseEvent** - Triggered when the countdown is closed, either after completion or cancellation.\n\n```java\n@EventHandler\npublic void onCountdownStart(CountdownStartEvent event) {\n    String countdownId = event.getCountdownId();\n    getServer().broadcastMessage(\"Countdown started for: \" + countdownId);\n}\n\n@EventHandler\npublic void onCountdownFinish(CountdownFinishEvent event) {\n    String countdownId = event.getCountdownId();\n    getServer().broadcastMessage(\"Countdown finished for: \" + countdownId);\n}\n\n@EventHandler\npublic void onCountdownCancel(CountdownCancelEvent event) {\n    String countdownId = event.getCountdownId();\n    getServer().broadcastMessage(\"Countdown canceled for: \" + countdownId);\n}\n\n@EventHandler\npublic void onCountdownClose(CountdownCloseEvent event) {\n    String countdownId = event.getCountdownId();\n    getServer().broadcastMessage(\"Countdown closed for: \" + countdownId);\n}\n```\n\n\n\n**If you are interested in exploring functional programming and its applications within this project visit the repository at [vavr-in-action](https://github.com/noyzys/bukkit-vavr-in-action), [fp-practice](https://github.com/noyzys/fp-practice).**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoyzys%2Fnautchkafe-countdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoyzys%2Fnautchkafe-countdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoyzys%2Fnautchkafe-countdown/lists"}