Extension

PlayerTools gives agents
player awareness

PlayerTools extends MCAgents with tools about the people on your server: who they are, how they are doing, and — for operators — how to act on them. It adds tools to the plugin only; it needs no route of its own on the central server.

PaperMC SpigotMC FoliaMC

How it works

When the MCAgents plugin loads, PlayerTools registers its tools under the player and admin categories. From then on the agent can call them during any conversation — and every call is checked against the caller's Minecraft permissions before anything happens.

  1. A player or operator asks something

    For example: "How hungry am I?" or "Is anyone here an operator?" The agent decides which tool answers the question.

  2. The tool identifies the caller

    Each tool resolves the account of the person talking to the agent and finds them on the server before doing anything else.

  3. Permissions are checked in code

    Asking about yourself is free. Asking about someone else — or using any administrative tool — requires OP status, verified manually inside the tool itself.

  4. Actions run on the right thread

    Anything that changes the game, like kicking a player during a ban, is handed to the platform's scheduler — the main thread on PaperMC and SpigotMC, the entity scheduler on FoliaMC.

Information tools

Read-only tools about players. Self-lookups are open to everyone; looking at other players requires OP.

get_player_nameEveryone

Tells the agent the in-game name of the player it is talking to.

get_player_uuidEveryone

Returns the unique identifier of the calling player.

get_player_healthOP for others

Reports current and maximum health. Players can check themselves; checking someone else needs OP.

get_player_foodOP for others

Reports food level and saturation, with the same self-versus-others rule.

get_player_infoOP for others

Looks up a player by name and returns their identity details.

Administration tools

Operator-only tools. Every one of them verifies OP status in code before acting, and ban tools refuse to target operators.

ban_playerOP only

Bans one or several players by name, kicks them if they are online, and records the reason. Operators cannot be banned.

ban_player_ipOP only

Bans by player name or direct IP address. It refuses to ban an address that an operator is currently using.

check_player_ipOP only

Shows the address an online player is connecting from.

check_players_opOP only

Checks whether specific players have operator status.

check_all_player_opOP only

Lists every operator on the server for a quick audit.

The permission checks described here are written directly into each tool's code, so they hold no matter how the agent is prompted. Details live in the extension-playertools repository.