PlayerTools gives agents
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.
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.
-
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.
-
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.
-
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.
-
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.
Tells the agent the in-game name of the player it is talking to.
Returns the unique identifier of the calling player.
Reports current and maximum health. Players can check themselves; checking someone else needs OP.
Reports food level and saturation, with the same self-versus-others rule.
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.
Bans one or several players by name, kicks them if they are online, and records the reason. Operators cannot be banned.
Bans by player name or direct IP address. It refuses to ban an address that an operator is currently using.
Shows the address an online player is connecting from.
Checks whether specific players have operator status.
Lists every operator on the server for a quick audit.