op_player
Grant operator privileges to a player on a Minecraft Java Edition server, enabling administrative control for server management and moderation.
Instructions
Grant operator status to a player.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| player | Yes | Player name |
Implementation Reference
- src/tools/player-tools.ts:38-60 (handler)Implementation of the 'op_player' tool handler in 'src/tools/player-tools.ts'. It takes a player name as input and sends an 'op' command via RCON.
server.tool( "op_player", "Grant operator status to a player.", { player: z.string().describe("Player name"), }, async ({ player }) => { try { const response = await manager.rcon.send(`op ${player}`); return { content: [{ type: "text", text: response }] }; } catch (error) { return { content: [ { type: "text", text: `Failed: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } } );