CodeRandom Core
⚪ Last updated 2024🖼️ Gallery (1 images)
🔍 Analysis
- 🏆 #1172 of 1224 bukkit mods in this game by downloads
📋 About This Mod
# CodeRandomCore ###### Current version `v1.0.0-1.21` CodeRandomCore 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. ## Table of Contents - (#installation) - (#configuration) - (#usage) - (#uuid-management) - (#mysql-management) - (#messaging-utilities) - (#title-utilities) - (#actionbar-utilities) ## Installation 1. Download the latest release of the CodeRandomCore plugin. 2. Place the plugin JAR file in your server's `plugins` directory. 3. Start your Minecraft server to generate the default configuration files. ## Configuration The plugin uses a configuration file located at `plugins/CodeRandomCore/config.yml`. Here is an example of the MySQL configuration section: ```yaml MySQL: enabled: false host: localhost port: 3306 database: code_random username: root password: "" ``` ### Configuration Options - `enabled`: Set to `true` to enable MySQL support. - `host`: The hostname or IP address of your MySQL server. - `port`: The port number of your MySQL server (default is 3306). - `database`: The name of the database to use. - `username`: The username for the MySQL connection. - `password`: The password for the MySQL connection. ## Usage ### UUID Management CodeRandomCore provides utilities for managing player UUIDs, especially for Bedrock players using Floodgate. #### Fetching UUIDs To fetch a player's UUID: ``` UUID uuid = UUIDFetcher.getUUID("playerName"); ``` This method will automatically determine if the player is a Bedrock player, an online player, or an offline player, and fetch the UUID accordingly. ### MySQL and JSON File Management The plugin uses HikariCP for managing MySQL connections. #### Initializing MySQL Ensure that MySQL is enabled in your `config.yml` file. The MySQLManager class manages the connection pool: ``` MySQLManager mysqlManager = MySQLManager.getInstance(); if (mysqlManager.connect()) { // Connected successfully } else { // Connection failed } ``` #### Executing Queries To execute queries: ``` String query = "SELECT * FROM players"; try (ResultSet rs = mysqlManager.executeQuery(query)) { while (rs.next()) { // Process the result set } } catch (SQLException e) { e.printStackTrace(); } ``` ### Messaging Utilities The plugin provides utilities for sending formatted messages to players. #### Sending Messages To send a formatted message: ``` MessageUtils.formattedMessage(player, "Your message here"); ``` To send a message with a title and lines: ``` MessageUtils.messageWithTitle(player, "Title", "Line 1", "Line 2" ...); ``` ### Title Utilities To send titles to players: ``` TitleUtils.title(player, "Main Title", "Subtitle", 20, 100, 20); ``` This will display a title with a fade-in time of 20 ticks, stay time of 100 ticks, and fade-out time of 20 ticks. ### ActionBar Utilities To send an action bar message: ``` ActionBarUtils.actionBar(player, "ActionBar Message", 60); ``` This will display an action bar message for 3 seconds (60 ticks). ## License This project is Non-Commercial License with API Usage Exception. See the (LICENSE) file for details.
# CodeRandomCore ###### Current version `v1. 0. 0-1. 21`
CodeRandomCore 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.
## Table of Contents - (#installation) - (#configuration) - (#usage) - (#uuid-management) - (#mysql-management) - (#messaging-utilities) - (#title-utilities) - (#actionbar-utilities)
## Installation
1. Download the latest release of the CodeRandomCore plugin. 2. Place the plugin JAR file in your server's `plugins` directory. 3. Start your Minecraft server to generate the default configuration files.
## Configuration
The plugin uses a configuration file located at `plugins/CodeRandomCore/config.yml`. Here is an example of the MySQL configuration section:
```yaml MySQL: enabled: false host: localhost port: 3306 database: code_random username: root password: "" ```
### Configuration Options
- `enabled`: Set to `true` to enable MySQL support.
- `host`: The hostname or IP address of your MySQL server.
- `port`: The port number of your MySQL server (default is 3306).
- `database`: The name of the database to use.
- `username`: The username for the MySQL connection.
- `password`: The password for the MySQL connection.
### UUID Management
CodeRandomCore provides utilities for managing player UUIDs, especially for Bedrock players using Floodgate.
#### Fetching UUIDs
To fetch a player's UUID:
``` UUID uuid = UUIDFetcher.getUUID("playerName"); ```
This method will automatically determine if the player is a Bedrock player, an online player, or an offline player, and fetch the UUID accordingly.
### MySQL and JSON File Management
The plugin uses HikariCP for managing MySQL connections.
#### Initializing MySQL
Ensure that MySQL is enabled in your `config.yml` file. The MySQLManager class manages the connection pool:
``` MySQLManager mysqlManager = MySQLManager.getInstance();
if (mysqlManager.connect()) { // Connected successfully } else { // Connection failed } ```
#### Executing Queries
To execute queries:
``` String query = "SELECT * FROM players"; try (ResultSet rs = mysqlManager.executeQuery(query)) { while (rs.next()) { // Process the result set } } catch (SQLException e) { e.printStackTrace(); } ```
### Messaging Utilities
The plugin provides utilities for sending formatted messages to players.
#### Sending Messages
To send a formatted message:
``` MessageUtils.formattedMessage(player, "Your message here"); ```
To send a message with a title and lines:
``` MessageUtils.messageWithTitle(player, "Title", "Line 1", "Line 2" ...); ```
### Title Utilities
To send titles to players:
``` TitleUtils.title(player, "Main Title", "Subtitle", 20, 100, 20); ```
This will display a title with a fade-in time of 20 ticks, stay time of 100 ticks, and fade-out time of 20 ticks.
### ActionBar Utilities
To send an action bar message:
``` ActionBarUtils.actionBar(player, "ActionBar Message", 60); ```
This will display an action bar message for 3 seconds (60 ticks).
This project is Non-Commercial License with API Usage Exception. See the (LICENSE) file for details.
📊 Mod Details
- Game
- Minecraft Plugins
- Author
- CodeRandom
- Version
- 1.0.0-1.21
- Downloads
- 81
- Endorsements
- 2
- Category
- bukkit
- Created
- 8/3/2024
- Updated
- 8/2/2024
- Game Versions
- 1.21
- Tags
- optimization, storage, utility
🔧 How to Install Minecraft Plugins Mods
Download from Modrinth. Use Prism Launcher or drop into your mods folder.
📖 Full step-by-step install guide for Minecraft Plugins →
Visit the official mod page for specific installation instructions for this mod.
🎮 Need cheat codes or console commands? Check ur gaming wiki for Minecraft Plugins commands, item IDs, and more.
❓ Frequently Asked Questions
Which Minecraft Plugins versions does CodeRandom Core support?
The author lists 1.21. Other versions may work but are untested by the author.
What is the latest version of CodeRandom Core?
Version 1.0.0-1.21, published 2024-08-02 with 81 downloads recorded at the source.
Keep browsing — more Minecraft Plugins mods await
