Commands
HMTAPI registers a single command. It has no subcommands other than reload.
/hmtapi reload
Section titled “/hmtapi reload”Reloads config.yml without restarting the server.
/hmtapi reloadReloaded HMTAPI.Requires the hmtapi.reload permission, which operators have by default.
What a reload applies
Section titled “What a reload applies”| Applies immediately | Needs a restart |
|---|---|
Changes under endpoints |
bind_address |
request_timeout_seconds |
port |
time_zone |
|
date_format |
|
never_seen_value |
If a reload changes bind_address or port, HMTAPI keeps serving on the old address and tells you
in the console that a restart is required:
[HMTAPI] The API address changed from 0.0.0.0:4567 to 0.0.0.0:8080. Restart the server to apply it.Removing an endpoint
Section titled “Removing an endpoint”Delete the endpoint from config.yml and reload. Requests to it immediately return
{"error": "Endpoint 'name' not found."}. See Status codes.
Permission
Section titled “Permission”| Permission | Default | Description |
|---|---|---|
hmtapi.reload |
Operator | Allows reloading config.yml |
You do not need to assign it anywhere if you only use it as an operator. To give it to a non-staff role, add it to a permissions plugin such as LuckPerms:
/lp user <player> permission set hmtapi.reload trueA player without the permission sees:
You do not have permission to use this command.| Input | Result |
|---|---|
/hmtapi reload |
Reloads the config |
/hmtapi |
Shows Usage: /hmtapi reload |
/hmtapi reload extra |
Reports too many arguments |
/hmtapi foo |
Reports an unknown subcommand |
Typing /hmtapi <TAB> suggests reload.
Next steps
Section titled “Next steps”- Configuration — what you can change
- Troubleshooting — if a reload does not take effect