Initial commit: Minecraft dashboard
Next.js 16 + Tailwind v4 + shadcn v4 dashboard for managing a modded Forge 1.20.1 server. Includes server controls, player management, mod manager with Modrinth search and dependency resolution, world backups, snapshots, analytics, logs, and chat bridge. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
dd69c17c3b
77 changed files with 7007 additions and 0 deletions
18
lib/rcon.ts
Normal file
18
lib/rcon.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { Rcon } from "rcon-client";
|
||||
import { MC_SERVER_IP, RCON_PORT, RCON_PASSWORD } from "./constants";
|
||||
|
||||
export async function sendCommand(command: string): Promise<string> {
|
||||
const rcon = await Rcon.connect({
|
||||
host: MC_SERVER_IP,
|
||||
port: RCON_PORT,
|
||||
password: RCON_PASSWORD,
|
||||
timeout: 5000,
|
||||
});
|
||||
|
||||
try {
|
||||
const response = await rcon.send(command);
|
||||
return response;
|
||||
} finally {
|
||||
rcon.end();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue