This commit is contained in:
7cc5c4f330d47060 2025-02-04 22:39:31 -05:00
parent 984953184b
commit a35ea2db6c
Signed by: 7cc5c4f330d47060
SSH key fingerprint: SHA256:e+4tcZut1nBpe10PqjaO+Rvie0Q7W4qIvFzcUw+7riA
3 changed files with 57 additions and 30 deletions

View file

@ -7,7 +7,7 @@ botv12 is a Minecraft bot originally designed for [Kaboom](https://kaboom.pw/) a
- a command core, to run commands quickly
- a hashing system, to enable trusted users to securely run certain commands in chat
It supports all Minecraft versions from 1.13 to 1.21.3 that are supported by node-minecraft-protocol. It may work on other versions, however, support will not be provided for them.
It supports all Minecraft versions from 1.13 to 1.21.3 that are supported by node-minecraft-protocol. It may work on other versions, however, support will not be provided for them. It is recommended to use the bot on the version of the server, if at all possible.
## How to install?

View file

@ -7,10 +7,12 @@ import chatlog from '../util/chatlog.js'
const execute = (c) => {
const payload = c.args.join(' ')
if (!settings.disableLogging && !settings.disableEvalLogging) chatlog(`eval`, `${c.host}:${c.port} ${c.username} (${c.uuid}) Payload: ${payload}`)
let result;
try {
const result = inspect(eval(payload))
result = inspect(eval(payload))
if (!settings.disableLogging && !settings.disableEvalLogging) chatlog(`eval`, `${c.host}:${c.port} ${c.username} (${c.uuid}) Result: ${result}`)
} catch (e){
result = inspect(e)
if (!settings.disableLogging && !settings.disableEvalLogging) chatlog(`eval`, `${c.host}:${c.port} ${c.username} (${c.uuid}) Error: ${inspect(e)}`)
}
if (c.type === 'console') {

81
package-lock.json generated
View file

@ -37,9 +37,9 @@
}
},
"node_modules/@types/node": {
"version": "22.10.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz",
"integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==",
"version": "22.10.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.5.tgz",
"integrity": "sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==",
"license": "MIT",
"dependencies": {
"undici-types": "~6.20.0"
@ -305,15 +305,6 @@
],
"license": "BSD-3-Clause"
},
"node_modules/jose": {
"version": "4.15.9",
"resolved": "https://registry.npmjs.org/jose/-/jose-4.15.9.tgz",
"integrity": "sha512-1vUQX+IdDMVPj4k8kOxgUqlcK518yluMuGZwqlr44FS1ppZB/5GWh4rZG89erpOBOJjU/OBsnCVFfapsRz6nEA==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/panva"
}
},
"node_modules/json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
@ -430,9 +421,9 @@
"license": "MIT"
},
"node_modules/minecraft-data": {
"version": "3.80.0",
"resolved": "https://registry.npmjs.org/minecraft-data/-/minecraft-data-3.80.0.tgz",
"integrity": "sha512-UYq+ADpS9K1+cqiJiz6tqkht4y4cRYF3qOYanG9eIiHY+VC+qIAC7/UcW6G3adayvj5YBOCurlqaw3E0TMAtHg==",
"version": "3.83.1",
"resolved": "https://registry.npmjs.org/minecraft-data/-/minecraft-data-3.83.1.tgz",
"integrity": "sha512-5K26za9k5WV1OnfkGexA77lBhfGZeFw3rT3NM7/rbFXRZC65prCx7Tk2BQvC9UfzgxxvmxHfxM5y8G1U+Oxgfg==",
"license": "MIT"
},
"node_modules/minecraft-folder-path": {
@ -442,9 +433,9 @@
"license": "MIT"
},
"node_modules/minecraft-protocol": {
"version": "1.51.0",
"resolved": "https://registry.npmjs.org/minecraft-protocol/-/minecraft-protocol-1.51.0.tgz",
"integrity": "sha512-ACvquP6fI8TdPXfPNNGTTi9v12WW6LS4k2KmmUBSmNncM0KnUwywqTT6YQIfCff6dUMd9DZB1oaNZfEDto+QQw==",
"version": "1.53.0",
"resolved": "https://registry.npmjs.org/minecraft-protocol/-/minecraft-protocol-1.53.0.tgz",
"integrity": "sha512-V6zr91G5VUke4VLDtmlcBmP+f2tA4LkHiPOR4fYBS4ShUTRqxYw3KgKLhFSIMxGYrVsGHpgWf3Hm4O1hN2Enzw==",
"license": "BSD-3-Clause",
"dependencies": {
"@types/node-rsa": "^1.1.4",
@ -545,20 +536,43 @@
}
},
"node_modules/prismarine-auth": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/prismarine-auth/-/prismarine-auth-2.5.0.tgz",
"integrity": "sha512-CRv/pL6d/T+4cdjWS223PXG+ygHbz40Kef04L59SLMT+axNdAQro23eZZhgiIIu6u7rlvJcZYlIY93gFNtKxXA==",
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/prismarine-auth/-/prismarine-auth-2.5.1.tgz",
"integrity": "sha512-FsicbLvpN72dEjTR577st+KKJ6wWKyYx/fzcvbzlHkgL34mfJ13CGY6WbW4q9UK1CWTXSnq3WQCFXr8NSaGZiw==",
"license": "MIT",
"dependencies": {
"@azure/msal-node": "^2.0.2",
"@xboxreplay/xboxlive-auth": "^3.3.3",
"debug": "^4.3.3",
"jose": "^4.1.4",
"node-fetch": "^2.6.1",
"smart-buffer": "^4.1.0",
"uuid-1345": "^1.0.2"
}
},
"node_modules/prismarine-biome": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/prismarine-biome/-/prismarine-biome-1.3.0.tgz",
"integrity": "sha512-GY6nZxq93mTErT7jD7jt8YS1aPrOakbJHh39seYsJFXvueIOdHAmW16kYQVrTVMW5MlWLQVxV/EquRwOgr4MnQ==",
"license": "MIT",
"peerDependencies": {
"minecraft-data": "^3.0.0",
"prismarine-registry": "^1.1.0"
}
},
"node_modules/prismarine-block": {
"version": "1.20.0",
"resolved": "https://registry.npmjs.org/prismarine-block/-/prismarine-block-1.20.0.tgz",
"integrity": "sha512-4epPqpUtpL5NzUEu4y498UPh++vQDB7bxtCbKGqFxVmNsN1H1JO6bucRdHsF5Vv3+J3/FcPReHzy4sheyZhydA==",
"license": "MIT",
"dependencies": {
"minecraft-data": "^3.38.0",
"prismarine-biome": "^1.1.0",
"prismarine-chat": "^1.5.0",
"prismarine-item": "^1.10.1",
"prismarine-nbt": "^2.0.0",
"prismarine-registry": "^1.1.0"
}
},
"node_modules/prismarine-chat": {
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/prismarine-chat/-/prismarine-chat-1.10.1.tgz",
@ -570,6 +584,16 @@
"prismarine-registry": "^1.4.0"
}
},
"node_modules/prismarine-item": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/prismarine-item/-/prismarine-item-1.15.0.tgz",
"integrity": "sha512-DysyiCzaI8S7PpRLFylAZnQo2CppXiBbaUp+8rhK+EzvzmMdS+D1/oETQm9ysB5Jw9eCer6iWGMgzZXxJE5+/w==",
"license": "MIT",
"dependencies": {
"prismarine-nbt": "^2.0.0",
"prismarine-registry": "^1.4.0"
}
},
"node_modules/prismarine-nbt": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/prismarine-nbt/-/prismarine-nbt-2.7.0.tgz",
@ -590,12 +614,13 @@
}
},
"node_modules/prismarine-registry": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/prismarine-registry/-/prismarine-registry-1.10.0.tgz",
"integrity": "sha512-6TYQiZHtsJ87HsB2E0yamCFp77ZyyLT16OmW5iXB5V30yCPflhHvR5TR2IqISmmiRc2093BkHfiIhsOZaMatmQ==",
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/prismarine-registry/-/prismarine-registry-1.11.0.tgz",
"integrity": "sha512-uTvWE+bILxYv4i5MrrlxPQ0KYWINv1DJ3P2570GLC8uCdByDiDLBFfVyk4BrqOZBlDBft9CnaJMeOsC1Ly1iXw==",
"license": "MIT",
"dependencies": {
"minecraft-data": "^3.70.0",
"prismarine-block": "^1.17.1",
"prismarine-nbt": "^2.0.0"
}
},
@ -664,9 +689,9 @@
}
},
"node_modules/readable-stream": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.6.0.tgz",
"integrity": "sha512-cbAdYt0VcnpN2Bekq7PU+k363ZRsPwJoEEJOEtSJQlJXzwaxt3FIo/uL+KeDSGIjJqtkwyge4KQgD2S2kd+CQw==",
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",
"integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",
"license": "MIT",
"dependencies": {
"abort-controller": "^3.0.0",