promotional bannermobile promotional banner
premium banner
Create Commands with Ease like /discord /shop or /Teamspeak

Description

# CustomCommands (Hytale)

A small Hytale server plugin that lets you define simple chat commands in a JSON file.

## Features

- Define custom commands in `config.json`
- Each command replies with a configurable message
- Optional clickable link output via `linkUrl`
- Per-command permission node support
- Admin commands to list and reload registered commands

## Installation

2. Copy the JAR into your server `mods/` folder.
3. Start the server once to generate the config 
## Support

Embed Removed: https://discord.com/widget?id=744980147404406894&theme=dark

 
<iframe src="https://discord.com/widget?id=744980147404406894&amp;theme=dark" width="350" height="500" allowtransparency="true" frameborder="0" sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe>
 
## Configuration

Config file path:

- `mods/CommandsPlugin/config.json` (plugin writes/reads this path)

Example:

- `debugEnabled` (boolean): Enables extra debug output (default: `false`)
- `commands` (array): List of custom commands

```json
{
  "debugEnabled": false,
  "commands": [
    {
      "name": "discord",
      "response": "Discord: https://discord.gg/DEIN_INVITE",
      "linkUrl": "https://discord.gg/DEIN_INVITE"
    },
    {
      "name": "rules",
      "response": "Regeln:\</span>n1) Sei respektvoll\</span>n2) Kein Spam\</span>n3) Kein Cheating\</span>n4) Folge den Anweisungen des Teams"
    }
  ]
}
```

### Command fields

- `name` *(string, required)*: Command name (with or without leading `/`).
- `response` *(string, required)*: Message sent to the player.
- `linkUrl` *(string, optional)*: If set, the plugin sends the URL as a separate clickable message.
- `permission` *(string, optional)*: Permission node required to use the command.
  - Default if omitted: `CustomCommand.Command.<name>`

## Permissions

This plugin uses the command system’s built-in permission requirement (`requirePermission(...)`).

### Per-command

By default each configured command requires:

- `CustomCommand.Command.<commandName>`

Example:

- `/discord` -> `CustomCommand.Command.discord`
- `/rules` -> `CustomCommand.Command.rules`

If you set `permission` in the config, that permission node is required instead.

### Admin

- `/cmdreload` -> `CustomCommand.admin.reload`
- `/cmdlist` -> `CustomCommand.admin.list`
- Wildcard supported for both admin commands: `CustomCommand.admin.*`


## Commands

- `/<name>`: Any command defined in `config.json`
- `/cmdlist`: Lists currently registered configurable commands
- `/cmdreload`: Reloads `config.json` and registers newly added commands

## Notes / Limitations

- Reload currently only registers *new* commands (it does not remove or replace already-registered commands).
- If you change an existing command’s response, restart the server (or extend the plugin to unregister/re-register).