SafetyValidator

class SafetyValidator(allowedCommands: List<String>, maxEntitiesPerCommand: Int, maxBlocksPerCommand: Int)(source)

Validates Minecraft commands against a whitelist and safety rules.

All checks are pure regex/string operations with no Minecraft dependencies, so this class can live in src/main/ and be reused by both client and server MCP tools.

Constructors

Link copied to clipboard
constructor(allowedCommands: List<String>, maxEntitiesPerCommand: Int, maxBlocksPerCommand: Int)

Types

Link copied to clipboard
data class ValidationResult(val isValid: Boolean, val errorMessage: String?)

Result of a safety validation check.

Functions

Link copied to clipboard

Validates a single command string.