{"id":15174217,"url":"https://github.com/coderandommc/coderandom-core","last_synced_at":"2026-01-24T10:33:48.823Z","repository":{"id":251276176,"uuid":"836688270","full_name":"CodeRandomMC/CodeRandom-Core","owner":"CodeRandomMC","description":"CodeRandomCore is a Bukkit plugin designed to manage various aspects of a Minecraft server, including player UUIDs, MySQL database interactions, and messaging utilities.","archived":false,"fork":false,"pushed_at":"2024-08-04T21:58:25.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"1.21","last_synced_at":"2025-02-11T11:38:29.222Z","etag":null,"topics":["api","bukkit","bukkit-plugin","minecraft-plugin","papermc","papermc-plugin","spigot","spigot-plugin"],"latest_commit_sha":null,"homepage":"https://github.com/D4RKJ0K3R17/CodeRandom-Core/releases","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeRandomMC.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":"2024-08-01T10:57:48.000Z","updated_at":"2024-08-04T21:58:28.000Z","dependencies_parsed_at":"2024-08-01T23:28:31.210Z","dependency_job_id":"84e57506-4bf2-4f89-ab1f-02bbdeaab1e8","html_url":"https://github.com/CodeRandomMC/CodeRandom-Core","commit_stats":null,"previous_names":["d4rkj0k3r17/coderandom-core","coderandommc/coderandom-core"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeRandomMC%2FCodeRandom-Core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeRandomMC%2FCodeRandom-Core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeRandomMC%2FCodeRandom-Core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeRandomMC%2FCodeRandom-Core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeRandomMC","download_url":"https://codeload.github.com/CodeRandomMC/CodeRandom-Core/tar.gz/refs/heads/1.21","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253960914,"owners_count":21990938,"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":["api","bukkit","bukkit-plugin","minecraft-plugin","papermc","papermc-plugin","spigot","spigot-plugin"],"created_at":"2024-09-27T11:41:09.236Z","updated_at":"2026-01-24T10:33:48.816Z","avatar_url":"https://github.com/CodeRandomMC.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CodeRandomCore\n###### Current version `v1.0.0-1.21`\n\nCodeRandomCore is a Bukkit plugin designed to manage various aspects of a Minecraft server, including player UUIDs, MySQL database interactions, and messaging utilities. This guide will help you set up and use the API provided by the plugin.\n\n## Table of Contents\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Usage](#usage)\n  - [UUID Management](#uuid-management)\n  - [MySQL Management](#mysql-management)\n  - [Messaging Utilities](#messaging-utilities)\n  - [Title Utilities](#title-utilities)\n  - [ActionBar Utilities](#actionbar-utilities)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\n1. Download the latest release of the CodeRandomCore plugin.\n2. Place the plugin JAR file in your server's `plugins` directory.\n3. Start your Minecraft server to generate the default configuration files.\n\n## Configuration\n\nThe plugin uses a configuration file located at `plugins/CodeRandomCore/config.yml`. Here is an example of the MySQL configuration section:\n\n```yaml\nMySQL:\n  enabled: false\n  host: localhost\n  port: 3306\n  database: code_random\n  username: root\n  password: \"\"\n```\n\n### Configuration Options\n\n- `enabled`: Set to `true` to enable MySQL support.\n- `host`: The hostname or IP address of your MySQL server.\n- `port`: The port number of your MySQL server (default is 3306).\n- `database`: The name of the database to use.\n- `username`: The username for the MySQL connection.\n- `password`: The password for the MySQL connection.\n\n## Usage\n\n### UUID Management\n\nCodeRandomCore provides utilities for managing player UUIDs, especially for Bedrock players using Floodgate.\n\n#### Fetching UUIDs\n\nTo fetch a player's UUID:\n\n```\nUUID uuid = UUIDFetcher.getUUID(\"playerName\");\n```\n\nThis method will automatically determine if the player is a Bedrock player, an online player, or an offline player, and fetch the UUID accordingly.\n\n### MySQL Management\n\nThe plugin uses HikariCP for managing MySQL connections.\n\n#### Initializing MySQL\n\nEnsure that MySQL is enabled in your `config.yml` file. The MySQLManager class manages the connection pool:\n\n```\nMySQLManager.initialize(plugin);\nMySQLManager mysqlManager = MySQLManager.getInstance();\n\nif (mysqlManager.connect()) {\n    // Connected successfully\n} else {\n    // Connection failed\n}\n```\n\n#### Executing Queries\n\nTo execute queries:\n\n```\nString query = \"SELECT * FROM players\";\ntry (ResultSet rs = mysqlManager.executeQuery(query)) {\n    while (rs.next()) {\n        // Process the result set\n    }\n} catch (SQLException e) {\n    e.printStackTrace();\n}\n```\n\n### Messaging Utilities\n\nThe plugin provides utilities for sending formatted messages to players.\n\n#### Sending Messages\n\nTo send a formatted message:\n\n```\nMessageUtils.formattedMessage(player, \"Your message here\");\n```\n\nTo send a message with a title and lines:\n\n```\nMessageUtils.messageWithTitle(player, \"Title\", \"Line 1\", \"Line 2\");\n```\n\n### Title Utilities\n\nTo send titles to players:\n\n```\nTitleUtils.title(player, \"Main Title\", \"Subtitle\", 20, 100, 20);\n```\n\nThis will display a title with a fade-in time of 20 ticks, stay time of 100 ticks, and fade-out time of 20 ticks.\n\n### ActionBar Utilities\n\nTo send an action bar message:\n\n```\nActionBarUtils.actionBar(player, \"ActionBar Message\", 60);\n```\n\nThis will display an action bar message for 3 seconds (60 ticks).\n\n## Contributing\n\n1. Fork the repository.\n2. Create your feature branch (`git checkout -b feature/fooBar`).\n3. Commit your changes (`git commit -am 'Add some fooBar'`).\n4. Push to the branch (`git push origin feature/fooBar`).\n5. Create a new Pull Request.\n\n## License\n\nThis project is Non-Commercial License with API Usage Exception. See the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderandommc%2Fcoderandom-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderandommc%2Fcoderandom-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderandommc%2Fcoderandom-core/lists"}