{"id":15281413,"url":"https://github.com/customrealms/core","last_synced_at":"2025-04-12T18:16:00.462Z","repository":{"id":44676452,"uuid":"426525208","full_name":"customrealms/core","owner":"customrealms","description":"Core library for the CustomRealms runtime","archived":false,"fork":false,"pushed_at":"2024-07-05T18:42:47.000Z","size":5356,"stargazers_count":40,"open_issues_count":12,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T18:15:18.971Z","etag":null,"topics":["bukkit","gaming","javascript","minecraft","server","typescript"],"latest_commit_sha":null,"homepage":"https://customrealms.io/core","language":"TypeScript","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/customrealms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2021-11-10T07:29:08.000Z","updated_at":"2025-02-08T22:15:01.000Z","dependencies_parsed_at":"2024-06-20T12:43:19.011Z","dependency_job_id":"5877b3de-f500-44e2-9757-8ff7e38174a3","html_url":"https://github.com/customrealms/core","commit_stats":{"total_commits":92,"total_committers":8,"mean_commits":11.5,"dds":"0.44565217391304346","last_synced_commit":"d48a363cc2f8e4cb719a57edfc281aa29982c80f"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/customrealms%2Fcore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/customrealms%2Fcore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/customrealms%2Fcore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/customrealms%2Fcore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/customrealms","download_url":"https://codeload.github.com/customrealms/core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248610354,"owners_count":21132924,"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","gaming","javascript","minecraft","server","typescript"],"created_at":"2024-09-30T13:07:39.563Z","updated_at":"2025-04-12T18:16:00.435Z","avatar_url":"https://github.com/customrealms.png","language":"TypeScript","readme":"# @customrealms/core\n\n\u003cimg src=\"https://github.com/customrealms/brand/blob/master/icon-solid/icon-solid.png\" width=\"200\" alt=\"CustomRealms Logo\" /\u003e\n\nThis repo contains the core library for CustomRealms, the JavaScript runtime for Minecraft server plugins.\n\n### Installation\n\n```sh\nnpm install --save @customrealms/core\n```\n\n### Example #1 - Events\n\n```ts\nimport { ServerEvents } from '@customrealms/core';\n\n// Send a welcome message when a player joins the server\nServerEvents.register(org.bukkit.event.player.PlayerJoinEvent, (event) =\u003e {\n\tconst player = event.getPlayer();\n\tevent.setJoinMessage(`${player.getName()} joined the server!`);\n});\n```\n\n### Example #2 - Commands\n\n```ts\nimport { ServerCommands } from '@customrealms/core';\n\n// Strike lightning where the player is looking\nServerCommands.register('/strike', (player) =\u003e {\n\tconst block = player.getTargetBlockExact(100);\n\tif (!block) return;\n\tconst location = block.getLocation();\n\tlocation.getWorld()?.strikeLightning(location);\n});\n```\n\n## How it works\n\nBy default, without this library, the CustomRealms JavaScript runtime has access to all of the Java and Bukkit classes and functions.\n\nThis library serves several important purposes:\n\n-   Provides TypeScript type declarations for the native Java / Bukkit types.\n-   Implements a clean abstraction layer to make certain common tasks easier (such as commands, events, etc.)\n-   Adds polyfills to support modern ES6+ features.\n\n## Contributing\n\nWe need your help to implement new features, fix bugs, and optimize the entire system. If you want to help, please join our [Discord](https://discord.gg/bsTearKQsm) and/or check out the [Issues tab](https://github.com/customrealms/core/issues).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcustomrealms%2Fcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcustomrealms%2Fcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcustomrealms%2Fcore/lists"}