-
Notifications
You must be signed in to change notification settings - Fork 0
AI Tools and Security
To let Sculk interact directly with Minecraft, the plugin uses a Recursive Tool Execution Loop. This allows the AI to run server-side actions, read outputs, and make subsequent decisions all in a single query turn.
- Player Message: The player sends a query (e.g. "I'm hurt and hungry, help me!").
-
AI Choice: The LLM receives the prompt and decides to execute a function:
heal_player. -
Execution: The server intercepts this call, checks permissions, executes the heal action, and converts the result to JSON (e.g.
{"success": true, "message": "Player has been fully healed."}). - Recursion: The JSON result is sent back to the AI. The AI reviews the result and can either call another tool or generate its final response to the player (e.g. "The sculk energy has mended your wounds.").
- The loop supports up to 5 tool iterations per chat query.
Below is the list of all 18 actions the AI can call. Some tools require specific player permissions or affection levels.
-
heal_player(Requires 30+ Affection)- Restores player health and hunger to maximum.
-
apply_potion_effect(Requires 10+ Affection)- Applies an active potion effect (Speed, Invisibility, Night Vision, etc.) for a specified duration and level.
-
gift_item_to_player(Requires 20+ Affection)- Drops a specified Material item stack at the player's feet.
-
play_sound(Requires 0+ Affection)- Triggers a Bukkit sound locally.
-
spawn_particles(Requires 0+ Affection)- Spawns cosmetic particles (Sculk Soul, Heart, Dragon Breath) around the player.
-
kick_player(Requires target to havesculk.sudopermission, 0+ Affection)- Kicks a specified player from the server.
-
teleport_player(Requires target to havesculk.sudo.teleportpermission, 0+ Affection)- Teleports a player to another player.
-
get_server_status(Requires querying player to havesculk.sudo.monitorpermission, 0+ Affection)- Returns TPS, RAM usage, loaded chunks, and total entity count.
-
broadcast_announcement(Requires querying player to havesculk.sudo.broadcastpermission, 0+ Affection)- Broadcasts a server-wide announcement prefix in red chat.
-
start_quest(Requires 0+ Affection)- Assigns a mob-hunting or item collection quest.
-
check_quest_status- Checks quest goals. For items, scans inventory and deducts them if complete.
-
complete_quest- Clears the completed quest from the player profile.
-
save_landmark(Requires 0+ Affection)- Saves player coordinates under a specific name.
-
teleport_to_landmark(Requires 0+ Affection)- Teleports the player to a saved location name.
-
modify_relationship- Manually updates player affection.
-
sacrifice_held_item- Deducts hand item and boosts relationship (if off cooldown).
-
remember_player_fact- Stores a summary detail in player's long-term memory.
To prevent the AI from executing unauthorized commands or abusing powers, three layers of security are enforced:
For advanced tools (like kick_player, teleport_player, get_server_status, broadcast_announcement), the plugin verifies permissions:
- The player must have the matching permission node (e.g.
sculk.sudo). - If they do not, the tool will not be registered/visible to the AI during that query, or the execution will be blocked.
The execute_console_command tool is strictly sandboxed. The AI can only execute commands that match the prefixes defined in the actions.allowed-commands list in config.yml.
-
Example Whitelist:
allowed-commands: - "summon firework_rocket" - "give %player% cookie"
- If the AI tries to run
op %player%orstop, the server blocks the action, logs a warning in the console, and returns an error payload to the LLM.
Even if a player has permission to request an action, the AI checks the player's affection level. If the player is hostile or neutral, the AI will refuse the request inside the conversation loop.
-
🟣 Sculk Companion
-
🎮 Player Guides
-
⚙️ Server Admin Guides