vitaminmcp 3.2.1 → 3.2.2
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/checksums.json +7 -7
- package/package.json +1 -1
- package/runner/src/actions.mjs +7 -17
package/checksums.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "3.2.
|
|
2
|
+
"version": "3.2.2",
|
|
3
3
|
"jars": {
|
|
4
|
-
"mcp-server.jar": "
|
|
4
|
+
"mcp-server.jar": "ccc3d22de5b86b77acd3a253d406943a22c50226b8ca7cdfb5f103086ccfc520"
|
|
5
5
|
},
|
|
6
6
|
"assets": {
|
|
7
|
-
"bot-runner-win-x64.exe": "
|
|
8
|
-
"bot-runner-linux-x64": "
|
|
9
|
-
"bot-runner-linux-arm64": "
|
|
10
|
-
"bot-runner-darwin-x64": "
|
|
11
|
-
"bot-runner-darwin-arm64": "
|
|
7
|
+
"bot-runner-win-x64.exe": "8da5317732e3c1a3a3a7a41aeb1e075551a914c37ad3f46a8fd5c2f986d9313c",
|
|
8
|
+
"bot-runner-linux-x64": "8c54d6a84ea6b0da06ecaaf91bb1da7206a54f1a1ad6bd0ec8ee00f17e87e55e",
|
|
9
|
+
"bot-runner-linux-arm64": "70e2c29c63806d9692c8d9e531618d92b1326d5f1d242d2303c8a79aee637084",
|
|
10
|
+
"bot-runner-darwin-x64": "eac2673b2c12ad99c840e3d826a86956972a84a4f54750b116b7caf2a787065a",
|
|
11
|
+
"bot-runner-darwin-arm64": "3869506c398dfb05a46b760bf6d76a919107132274201db5439b003e05874907",
|
|
12
12
|
"bot-runner-viewer-win-x64.tgz": "e39a36cdf92b9223aa7c9610f8231afc7a577e8ed007bc3571895bd945baf3e1"
|
|
13
13
|
}
|
|
14
14
|
}
|
package/package.json
CHANGED
package/runner/src/actions.mjs
CHANGED
|
@@ -141,26 +141,16 @@ function delay(millis) {
|
|
|
141
141
|
/** Runs a command as the bot. The leading slash is not part of the packet. */
|
|
142
142
|
export function command(bot, name, line) {
|
|
143
143
|
requireInWorld(bot, name);
|
|
144
|
-
bot.
|
|
145
|
-
command: line.startsWith('/') ? line.slice(1) : line,
|
|
146
|
-
timestamp: BigInt(Date.now()),
|
|
147
|
-
salt: 0n,
|
|
148
|
-
argumentSignatures: [],
|
|
149
|
-
messageCount: 0,
|
|
150
|
-
acknowledged: Buffer.alloc(3),
|
|
151
|
-
checksum: 0,
|
|
152
|
-
});
|
|
144
|
+
bot.chat(line.startsWith('/') ? line : `/${line}`);
|
|
153
145
|
}
|
|
154
146
|
|
|
155
|
-
/**
|
|
156
|
-
* Says something in chat.
|
|
157
|
-
*
|
|
158
|
-
* Through `/say`, exactly as the Java runner does it. A bot cannot send a signed chat message
|
|
159
|
-
* without a Mojang key, and an unsigned one is refused from 1.19 on, so the command is the only
|
|
160
|
-
* route that reaches the same listeners.
|
|
161
|
-
*/
|
|
147
|
+
/** Sends player chat through the library's signing and acknowledgement implementation. */
|
|
162
148
|
export function chat(bot, name, message) {
|
|
163
|
-
|
|
149
|
+
requireInWorld(bot, name);
|
|
150
|
+
if (message.startsWith('/')) {
|
|
151
|
+
throw new Error('Use the command action for slash commands; chat sends player chat.');
|
|
152
|
+
}
|
|
153
|
+
bot.chat(message);
|
|
164
154
|
}
|
|
165
155
|
|
|
166
156
|
/** Right-clicks a block — which is how a container or a plugin menu gets opened. */
|