Skip to content

Commands

HMTAPI registers a single command. It has no subcommands other than reload.

Reloads config.yml without restarting the server.

/hmtapi reload
Reloaded HMTAPI.

Requires the hmtapi.reload permission, which operators have by default.

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.

Delete the endpoint from config.yml and reload. Requests to it immediately return {"error": "Endpoint 'name' not found."}. See Status codes.

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 true

A 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.