@mairwunnx/minecraft-mcp 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tools/server.js +4 -1
- package/openapi/worldapi.json +6 -6
- package/package.json +1 -1
package/dist/tools/server.js
CHANGED
|
@@ -198,7 +198,7 @@ export function serverTools(ctx) {
|
|
|
198
198
|
name: "manage_access",
|
|
199
199
|
untrusted: true,
|
|
200
200
|
title: "Whitelist, operators, bans, and kicks",
|
|
201
|
-
description: "Change who may play, in one call; give only the parts you need. `whitelist` turns it on or off, enforces it (kicks online players who aren't on it), and adds or removes players. `operators` makes players operators or takes it away. `ban` bans players by name or UUID and `banIps` addresses, kicking anyone online they hit; `pardon` and `pardonIps` lift bans. `kick` disconnects players with a reason. Needs players:moderate. Confirm bans and kicks with the user first.",
|
|
201
|
+
description: "Change who may play, in one call; give only the parts you need. `whitelist` turns it on or off, enforces it (kicks online players who aren't on it), and adds or removes players. `operators` makes players operators or takes it away; it needs server:console, since an operator may run every command. `ban` bans players by name or UUID and `banIps` addresses, kicking anyone online they hit; `pardon` and `pardonIps` lift bans. `kick` disconnects players with a reason. Needs players:moderate. Confirm bans and kicks with the user first.",
|
|
202
202
|
scope: "players:moderate",
|
|
203
203
|
effect: "destructive",
|
|
204
204
|
input: {
|
|
@@ -223,6 +223,9 @@ export function serverTools(ctx) {
|
|
|
223
223
|
done.whitelist = await unwrap(api.PATCH("/server/whitelist", {
|
|
224
224
|
body: { ...args.whitelist, add: args.whitelist.add ?? [], remove: args.whitelist.remove ?? [] },
|
|
225
225
|
}), token);
|
|
226
|
+
// WorldAPI 4.1.1 asks server:console for operators: they run every command, /worldapi among them.
|
|
227
|
+
if (args.operators && !ctx.scopes.has("server:console"))
|
|
228
|
+
throw new Error("operators needs server:console: an operator may run every command; ask the user for a token that has it");
|
|
226
229
|
if (args.operators)
|
|
227
230
|
done.operators = await unwrap(api.PATCH("/server/ops", { body: { add: args.operators.add ?? [], remove: args.operators.remove ?? [] } }), token);
|
|
228
231
|
if (args.ban || args.pardon || args.banIps || args.pardonIps)
|
package/openapi/worldapi.json
CHANGED
|
@@ -4630,15 +4630,15 @@
|
|
|
4630
4630
|
"patch": {
|
|
4631
4631
|
"operationId": "patchPlayersPlayerPermissions",
|
|
4632
4632
|
"summary": "Make a player an operator or take it away",
|
|
4633
|
-
"description": "
|
|
4633
|
+
"description": "Needs `server:console`, not `players:moderate`: an operator may run every command, `/worldapi` among them.\n\nPermission: `server:console`.",
|
|
4634
4634
|
"tags": [
|
|
4635
4635
|
"Player data"
|
|
4636
4636
|
],
|
|
4637
|
-
"x-scope": "
|
|
4637
|
+
"x-scope": "server:console",
|
|
4638
4638
|
"security": [
|
|
4639
4639
|
{
|
|
4640
4640
|
"bearer": [
|
|
4641
|
-
"
|
|
4641
|
+
"server:console"
|
|
4642
4642
|
]
|
|
4643
4643
|
}
|
|
4644
4644
|
],
|
|
@@ -6539,15 +6539,15 @@
|
|
|
6539
6539
|
"patch": {
|
|
6540
6540
|
"operationId": "patchServerOps",
|
|
6541
6541
|
"summary": "Make players operators or take it away",
|
|
6542
|
-
"description": "
|
|
6542
|
+
"description": "Needs `server:console`, not `players:moderate`: an operator may run every command, `/worldapi` among them.\n\nPermission: `server:console`.",
|
|
6543
6543
|
"tags": [
|
|
6544
6544
|
"Access"
|
|
6545
6545
|
],
|
|
6546
|
-
"x-scope": "
|
|
6546
|
+
"x-scope": "server:console",
|
|
6547
6547
|
"security": [
|
|
6548
6548
|
{
|
|
6549
6549
|
"bearer": [
|
|
6550
|
-
"
|
|
6550
|
+
"server:console"
|
|
6551
6551
|
]
|
|
6552
6552
|
}
|
|
6553
6553
|
],
|
package/package.json
CHANGED