Integración de Comandos de Minecraft

Esta documentación describe cómo interactuar con un servidor de Minecraft utilizando una API REST basada en el repositorio Minecraft-server.

Descripción General

La API REST permite gestionar servidores de Minecraft mediante diferentes acciones, como iniciar, detener, reiniciar, enviar comandos, obtener logs, información del servidor, jugadores, métricas, y más.

Documentación y Pruebas de Reemplazo de Valores

Para más detalles sobre el reemplazo de valores, consulta Reemplazar Variables.

API REST

Endpoint: /servermanager/:serverName/:action

  • Métodos HTTP: GET, POST

Parámetros

  • :serverName: Nombre del servidor.
  • :action: Acción a realizar. Las acciones válidas son: start, stop, restart, send, sendMultiple, log, info, players, metrics, kill.

Variables y Constantes

Variables Disponibles

  • :serverName: Nombre del servidor.
  • :action: Acción a realizar.

Constantes Disponibles

type actions = 'start' | 'stop' | 'restart' | 'send' | 'sendMultiple' | 'log' | 'info' | 'players' | 'metrics' | 'kill';
Ejemplos de Uso
Generar comando con AI o MCP

Importar ejemplo

https://nglmercer.github.io/Actions?import=action&data={
"name": "sendMob",
"fetchForm_check": "true",
"fetchForm_value": {
"name": "minecraftsendMultiple",
"url": "http://localhost:3000/api/servermanager/NombreServidor/sendMultiple",
"method": "POST",
"headers": [
{
"key": "Content-Type",
"value": "application/json",
"enabled": true
}
],
"params": [],
"body": " {\"cmds\": [\n \"execute at @p run title @a title {\\\"text\\\":\\\"uniqueId\\\",\\\"color\\\":\\\"gold\\\"}\",\n \"execute at @p run title @a subtitle {\\\"text\\\":\\\"gifted giftName xrepeatCount\\\",\\\"color\\\":\\\"gold\\\"}\",\n \"execute at @p run summon zombie ~ ~ ~ {CustomName:'{\\\"text\\\":\\\"uniqueId\\\",\\\"color\\\":\\\"red\\\"}',CustomNameVisible:1b}\"\n ]}",
"bodyType": "json",
"auth": {}
}
}

Configurar Acción