Features
- AI: Allows players to ask questions to the AI directly from within the game. Note: You need an active LeaderOS AI subscription to use this feature.
- Verification: Enables players to link their in-game accounts with their website accounts.
- Discord Sync: With a simple command, this feature verifies a player’s Discord account and syncs it with your website, ensuring roles and nicknames are synchronized. It also allows users to log in to the website using their Discord credentials, streamlining user management and enhancing Discord integration.
- Credits: Allows players to view and manage their credits via user-friendly in-game commands.
- LeaderOS Connect: Securely transmits commands to the game server whenever a purchase is made on your website.
Installation
- Download the LeaderOS plugin JAR file and upload it to your server’s /mods folder.
- Start your server and wait for the plugin configuration files to be generated.
- Open the config.yml file and fill in the following fields:
url: Enter your website’s URL. Example: https://myhytaleserver.com
api-key: You can find your API key under Dashboard > Settings > API.
- To enable store purchases to send commands to the server, go to Dashboard > Store > Servers, add a new server, and select LeaderOS Connect as the console type.
- Open the
modules.yml file, enable the connect module, copy the generated Console Token, and paste it into the server-token field.
- Restart your server.
Commands
| Command | Description |
|---|
| /leaderos | Shows all available commands. |
| /leaderos reload | Reloads the plugin configuration. |
| /ai <prompt> | Asks a question to the AI. |
| /verify <code> | Links the in-game account with the website. |
| /discord-sync | Generates a link for Discord account synchronization. |
| /credits | Shows your current credit balance. |
| /credits show | Shows the credit balance of a specific player. |
| /credits send | Sends credits to another player. |
| /credits set | Sets a player’s credits to a specific amount. |
| /credits add | Adds a specific amount of credits to a player. |
| /credits remove | Removes a specific amount of credits from a player. |
Permissions
| Command | Permission |
|---|
| /leaderos | leaderos.help |
| /leaderos reload | leaderos.reload |
| /ai <prompt> | leaderos.ai |
| /verify <code> | leaderos.verify |
| /discord-sync | leaderos.discord.sync |
| /credits | leaderos.credit.see |
| /credits show | leaderos.credit.see.other |
| /credits send | leaderos.credit.send |
| /credits set | leaderos.credit.set |
| /credits add | leaderos.credit.add |
| /credits remove | leaderos.credit.remove |
How do I find my API Key?
You can find your API key by navigating to Dashboard > Settings > API.
If you do not see an API key on that page, click the “Reset” button to generate a new one.
How do I find my Server Token?
When you add a server with the “LeaderOS Connect” type via Dashboard > Store > Servers, the system will generate and display your server token.
How to create a new server?
- Go to Dashboard > Store > Servers > Add.
- Select “LeaderOS Connect” as the console type.
- Fill in the remaining server details.
- Click the “Create” button.
- You will be redirected to the plugin instructions page containing your token.
How to regenerate the Server Token?
- Go to Dashboard > Store > Servers and edit the relevant server.
- Click the “Reset” button.
- Replace the
server-token value in your modules.yml file with the new token.
How to check my console connection?
First, install the LeaderOS plugin and configure the connect module in both config.yml and modules.yml. Once completed, start your server. When the console connection is established successfully, you will see a confirmation log in your server console.
Server token is not generating or is empty?
This issue usually occurs because your API key is not synced with the LeaderOS systems. To resolve this, follow these steps:
- Go to Dashboard > Settings > API and reset your API key.
- Go to Dashboard > Store > Servers and regenerate your server token.
Unblocking API for sites using Cloudflare
If you are using Cloudflare, it may block your API system and prevent player logins. In this case, follow the steps below to whitelist the API system in Cloudflare:
- Log in to your Cloudflare dashboard.
- Navigate to Cloudflare > Security > Security Rules > Create Rule > Custom Rules.
- Create a rule that matches the configuration shown in the image below.