diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba8bc74..e94fd94 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '17' + java-version: '21' # Build plugin - name: Build with Maven diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5a7c88c..82b46d0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,12 +6,12 @@ jobs: test: runs-on: ubuntu-latest timeout-minutes: 8 - continue-on-error: ${{ matrix.version == '1.20.4' }} + continue-on-error: ${{ matrix.version == '1.21.1' }} strategy: fail-fast: false matrix: flavor: ['bukkit', 'spigot', 'paper', 'purpur'] - version: ['1.20.4', '1.19.4', '1.18.2', '1.17.1', '1.16.5'] + version: ['1.21.1', '1.20.6', '1.19.4', '1.18.2', '1.17.1', '1.16.5'] steps: # Download code from repository - name: Checkout code @@ -22,7 +22,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '17' + java-version: '21' # Build plugin - name: Build with Maven @@ -33,7 +33,14 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: ${{ startsWith(matrix.version, '1.16') && '11' || (startsWith(matrix.version, '1.17') && '16' || '17') }} + java-version: | + ${{ + startsWith(matrix.version, '1.16') && '11' || + startsWith(matrix.version, '1.17') && '16' || + startsWith(matrix.version, '1.18') && '17' || + startsWith(matrix.version, '1.19') && '17' || + '21' + }} # Setup Node.js - name: Setup Node.js diff --git a/README.md b/README.md index 80e6e41..10ee753 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Download the JAR file for the [latest release](https://github.com/josemmo/yamipa Before installing Yamipa make sure you meet the following requirements: - CraftBukkit, Spigot or PaperMC 1.16 or higher -- [ProtocolLib](https://www.spigotmc.org/resources/protocollib.1997/) v5.0.0 or higher +- [ProtocolLib](https://www.spigotmc.org/resources/protocollib.1997/) v5.3.0 or higher Here are the Minecraft distributions where Yamipa should be able to run: | Minecraft version | CraftBukkit | Spigot | PaperMC | @@ -35,6 +35,7 @@ Here are the Minecraft distributions where Yamipa should be able to run: | 1.18 & 1.18.x | ✅ | ✅ | ✅ | | 1.19 & 1.19.x | ✅ | ✅ | ✅ | | 1.20 & 1.20.x | ✅ | ✅ | ✅ | +| 1.21 & 1.21.x | ✅ | ✅ | ✅ | ## Configuration Yamipa is ready-to-go right out of the box. By default, it creates the following files and directories under the diff --git a/automata/package-lock.json b/automata/package-lock.json index c49cd42..49ca59e 100644 --- a/automata/package-lock.json +++ b/automata/package-lock.json @@ -1,48 +1,52 @@ { "name": "@yamipa/automata", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@yamipa/automata", "dependencies": { - "mineflayer": "^4.14.0", - "rcon-client": "^4.2.3" + "mineflayer": "^4.21.0", + "rcon-client": "^4.2.5" } }, "node_modules/@azure/msal-common": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.1.0.tgz", - "integrity": "sha512-xphmhcfl5VL+uq5//VKMwQn+wfEZLMKNpFCcMi8Ur8ej5UT166g6chBsxgMzc9xo9Y24R9FB3m/tjDiV03xMIA==", + "version": "14.15.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.15.0.tgz", + "integrity": "sha512-ImAQHxmpMneJ/4S8BRFhjt1MZ3bppmpRPYYNyzeQPeFN288YKbb8TmmISQEbtfkQ1BPASvYZU5doIZOPBAqENQ==", + "license": "MIT", "engines": { "node": ">=0.8.0" } }, "node_modules/@azure/msal-node": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.2.0.tgz", - "integrity": "sha512-aZZ1m7OATOR9kz7+/Kl+/LZrNEj+HYaEH84XZfnBtN/9JPRazngk1XTjvAkh7W1u/O/yQrlYiiSwSAKHnNBc8A==", + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.15.0.tgz", + "integrity": "sha512-gVPW8YLz92ZeCibQH2QUw96odJoiM3k/ZPH3f2HxptozmH6+OnyyvKXo/Egg39HAM230akarQKHf0W74UHlh0Q==", + "license": "MIT", "dependencies": { - "@azure/msal-common": "14.1.0", + "@azure/msal-common": "14.15.0", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" }, "engines": { - "node": "18 || 20" + "node": ">=16" } }, "node_modules/@types/node": { - "version": "20.8.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.6.tgz", - "integrity": "sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ==", + "version": "22.7.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz", + "integrity": "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==", + "license": "MIT", "dependencies": { - "undici-types": "~5.25.1" + "undici-types": "~6.19.2" } }, "node_modules/@types/readable-stream": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.3.tgz", - "integrity": "sha512-Z8BOzyIj3UPpn3j5DmDNKIw4wPN9N8a1d1oyteiprWq+wxdgQNC0UfFAQwWjmjyA7uoj7mvoWgxWWH66zYtm4Q==", + "version": "4.0.15", + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.15.tgz", + "integrity": "sha512-oAZ3kw+kJFkEqyh7xORZOku1YAKvsFTogRY8kVl4vHpEKiDkfnSA/My8haRE7fvmix5Zyy+1pwzOi7yycGLBJw==", + "license": "MIT", "dependencies": { "@types/node": "*", "safe-buffer": "~5.1.1" @@ -51,12 +55,14 @@ "node_modules/@xboxreplay/errors": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@xboxreplay/errors/-/errors-0.1.0.tgz", - "integrity": "sha512-Tgz1d/OIPDWPeyOvuL5+aai5VCcqObhPnlI3skQuf80GVF3k1I0lPCnGC+8Cm5PV9aLBT5m8qPcJoIUQ2U4y9g==" + "integrity": "sha512-Tgz1d/OIPDWPeyOvuL5+aai5VCcqObhPnlI3skQuf80GVF3k1I0lPCnGC+8Cm5PV9aLBT5m8qPcJoIUQ2U4y9g==", + "license": "MIT" }, "node_modules/@xboxreplay/xboxlive-auth": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/@xboxreplay/xboxlive-auth/-/xboxlive-auth-3.3.3.tgz", "integrity": "sha512-j0AU8pW10LM8O68CTZ5QHnvOjSsnPICy0oQcP7zyM7eWkDQ/InkiQiirQKsPn1XRYDl4ccNu0WM582s3UKwcBg==", + "license": "MIT", "dependencies": { "@xboxreplay/errors": "^0.1.0", "axios": "^0.21.1" @@ -66,6 +72,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "license": "MIT", "dependencies": { "event-target-shim": "^5.0.0" }, @@ -76,12 +83,14 @@ "node_modules/aes-js": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", - "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==" + "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==", + "license": "MIT" }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -96,12 +105,14 @@ "node_modules/asn1": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha512-6i37w/+EhlWlGUJff3T/Q8u1RGmP5wgbiwYnOnbOqvtrPxT63/sYFyP9RcpxtxGymtfA075IvmOnL7ycNOWl3w==" + "integrity": "sha512-6i37w/+EhlWlGUJff3T/Q8u1RGmP5wgbiwYnOnbOqvtrPxT63/sYFyP9RcpxtxGymtfA075IvmOnL7ycNOWl3w==", + "license": "MIT" }, "node_modules/axios": { "version": "0.21.4", "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "license": "MIT", "dependencies": { "follow-redirects": "^1.14.0" } @@ -123,7 +134,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/buffer": { "version": "6.0.3", @@ -143,6 +155,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" @@ -152,6 +165,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.1.tgz", "integrity": "sha512-QoV3ptgEaQpvVwbXdSO39iqPQTCxSF7A5U99AxbHYqUdCizL/lH2Z0A2y6nbZucxMEOtNyZfG2s6gsVugGpKkg==", + "license": "MIT", "engines": { "node": ">=0.4" }, @@ -162,19 +176,22 @@ "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "license": "BSD-3-Clause" }, "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "license": "MIT" }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -188,12 +205,14 @@ "node_modules/discontinuous-range": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", - "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==" + "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==", + "license": "MIT" }, "node_modules/ecdsa-sig-formatter": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" } @@ -201,12 +220,14 @@ "node_modules/endian-toggle": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/endian-toggle/-/endian-toggle-0.0.0.tgz", - "integrity": "sha512-ShfqhXeHRE4TmggSlHXG8CMGIcsOsqDw/GcoPcosToE59Rm9e4aXaMhEQf2kPBsBRrKem1bbOAv5gOKnkliMFQ==" + "integrity": "sha512-ShfqhXeHRE4TmggSlHXG8CMGIcsOsqDw/GcoPcosToE59Rm9e4aXaMhEQf2kPBsBRrKem1bbOAv5gOKnkliMFQ==", + "license": "MIT" }, "node_modules/event-target-shim": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "license": "MIT", "engines": { "node": ">=6" } @@ -215,6 +236,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "license": "MIT", "engines": { "node": ">=0.8.x" } @@ -222,23 +244,26 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "license": "MIT" }, "node_modules/follow-redirects": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], + "license": "MIT", "engines": { "node": ">=4.0" }, @@ -265,17 +290,14 @@ "type": "consulting", "url": "https://feross.org/support" } - ] - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + ], + "license": "BSD-3-Clause" }, "node_modules/jose": { - "version": "4.15.3", - "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.3.tgz", - "integrity": "sha512-RZJdL9Qjd1sqNdyiVteRGV/bnWtik/+PJh1JP4kT6+x1QQMn+7ryueRys5BEueuayvSVY8CWGCisCDazeRLTuw==", + "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" } @@ -283,12 +305,14 @@ "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "license": "MIT" }, "node_modules/jsonwebtoken": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "license": "MIT", "dependencies": { "jws": "^3.2.2", "lodash.includes": "^4.3.0", @@ -310,6 +334,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "license": "MIT", "dependencies": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.11", @@ -320,6 +345,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "license": "MIT", "dependencies": { "jwa": "^1.4.1", "safe-buffer": "^5.0.1" @@ -328,83 +354,86 @@ "node_modules/lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==" + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", + "license": "MIT" }, "node_modules/lodash.includes": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", + "license": "MIT" }, "node_modules/lodash.isboolean": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", + "license": "MIT" }, "node_modules/lodash.isinteger": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", + "license": "MIT" }, "node_modules/lodash.isnumber": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", + "license": "MIT" }, "node_modules/lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "license": "MIT" }, "node_modules/lodash.isstring": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", + "license": "MIT" }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "license": "MIT" }, "node_modules/lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "license": "MIT" }, "node_modules/lodash.reduce": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", - "integrity": "sha512-6raRe2vxCYBhpBu+B+TtNGUzah+hQjVdu3E17wfusjyrXBka2nBS8OH/gjVZ5PvHOhWmIZTYri09Z6n/QfnNMw==" - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } + "integrity": "sha512-6raRe2vxCYBhpBu+B+TtNGUzah+hQjVdu3E17wfusjyrXBka2nBS8OH/gjVZ5PvHOhWmIZTYri09Z6n/QfnNMw==", + "license": "MIT" }, "node_modules/macaddress": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/macaddress/-/macaddress-0.5.3.tgz", - "integrity": "sha512-vGBKTA+jwM4KgjGZ+S/8/Mkj9rWzePyGY6jManXPGhiWu63RYwW8dKPyk5koP+8qNVhPhHgFa1y/MJ4wrjsNrg==" + "integrity": "sha512-vGBKTA+jwM4KgjGZ+S/8/Mkj9rWzePyGY6jManXPGhiWu63RYwW8dKPyk5koP+8qNVhPhHgFa1y/MJ4wrjsNrg==", + "license": "MIT" }, "node_modules/minecraft-data": { - "version": "3.46.2", - "resolved": "https://registry.npmjs.org/minecraft-data/-/minecraft-data-3.46.2.tgz", - "integrity": "sha512-vunI/l5mqjU7FisB5iFxcNl6BkKLzELUvsP5P4gpUOAUtTWXEUYTnVg9jdIFOl7Y2zw3TxG2RHDa0h0ScnRCEA==" + "version": "3.76.0", + "resolved": "https://registry.npmjs.org/minecraft-data/-/minecraft-data-3.76.0.tgz", + "integrity": "sha512-aqWonoe5h7to5iEfjUmG5r5F0K3FwrnF9c1YzxbALyOyRUujm2a/G5GJ4TfuoEslVp9dJ7OYVHLJfOS9aD/Twg==", + "license": "MIT" }, "node_modules/minecraft-folder-path": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minecraft-folder-path/-/minecraft-folder-path-1.2.0.tgz", - "integrity": "sha512-qaUSbKWoOsH9brn0JQuBhxNAzTDMwrOXorwuRxdJKKKDYvZhtml+6GVCUrY5HRiEsieBEjCUnhVpDuQiKsiFaw==" + "integrity": "sha512-qaUSbKWoOsH9brn0JQuBhxNAzTDMwrOXorwuRxdJKKKDYvZhtml+6GVCUrY5HRiEsieBEjCUnhVpDuQiKsiFaw==", + "license": "MIT" }, "node_modules/minecraft-protocol": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/minecraft-protocol/-/minecraft-protocol-1.44.0.tgz", - "integrity": "sha512-sYu4fFzUKt3spPG5tAdkaB9sNQPT0sV6fyS0sS7/nxdzFfjmLhF6BLNC+32ieK4/MhgNyHtH6xusD0Bi0Roq9w==", + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/minecraft-protocol/-/minecraft-protocol-1.49.0.tgz", + "integrity": "sha512-NqaW4mdcFSdfozNRzM4pZC18LrdpeUCWUDv+Ozem9VsPsHCx+u+pfI3wkxZPOmLfC3f1nfKiF/f6EwK+VxovoA==", + "license": "BSD-3-Clause", "dependencies": { "@types/readable-stream": "^4.0.0", "aes-js": "^3.1.2", @@ -413,14 +442,15 @@ "endian-toggle": "^0.0.0", "lodash.get": "^4.1.2", "lodash.merge": "^4.3.0", - "minecraft-data": "^3.37.0", + "minecraft-data": "^3.75.0", "minecraft-folder-path": "^1.2.0", "node-fetch": "^2.6.1", "node-rsa": "^0.4.2", "prismarine-auth": "^2.2.0", - "prismarine-nbt": "^2.0.0", + "prismarine-chat": "^1.10.0", + "prismarine-nbt": "^2.5.0", "prismarine-realms": "^1.2.0", - "protodef": "^1.8.0", + "protodef": "^1.17.0", "readable-stream": "^4.1.0", "uuid-1345": "^1.0.1", "yggdrasil": "^1.4.0" @@ -430,36 +460,38 @@ } }, "node_modules/mineflayer": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/mineflayer/-/mineflayer-4.14.0.tgz", - "integrity": "sha512-4EYzUmZNxH3Gpz3GkgO2eaR90ANb50nVhMCU2y6Rl1Ru8M6HqxID1Eg7tRgsodfAOD+AKh5SPwmPnISLcxvnOA==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/mineflayer/-/mineflayer-4.21.0.tgz", + "integrity": "sha512-0DiMOVan0u9ikZRzeTwXwXRJ+wXxsUTooG6TDVRKBYKAy99yRvIMVCrbarUcZuGhhQdEyeItC3+VwyfbU539NA==", + "license": "MIT", "dependencies": { - "minecraft-data": "^3.44.0", - "minecraft-protocol": "^1.44.0", + "minecraft-data": "^3.76.0", + "minecraft-protocol": "^1.49.0", "prismarine-biome": "^1.1.1", "prismarine-block": "^1.17.0", "prismarine-chat": "^1.7.1", "prismarine-chunk": "^1.34.0", "prismarine-entity": "^2.3.0", - "prismarine-item": "^1.14.0", + "prismarine-item": "^1.15.0", "prismarine-nbt": "^2.0.0", "prismarine-physics": "^1.8.0", "prismarine-recipe": "^1.3.0", - "prismarine-registry": "^1.5.0", - "prismarine-windows": "^2.8.0", + "prismarine-registry": "^1.8.0", + "prismarine-windows": "^2.9.0", "prismarine-world": "^3.6.0", - "protodef": "^1.14.0", + "protodef": "1.17.0", "typed-emitter": "^1.0.0", "vec3": "^0.1.7" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/mojangson": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/mojangson/-/mojangson-2.0.4.tgz", "integrity": "sha512-HYmhgDjr1gzF7trGgvcC/huIg2L8FsVbi/KacRe6r1AswbboGVZDS47SOZlomPuMWvZLas8m9vuHHucdZMwTmQ==", + "license": "MIT", "dependencies": { "nearley": "^2.19.5" } @@ -467,17 +499,20 @@ "node_modules/moo": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", - "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==" + "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==", + "license": "BSD-3-Clause" }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/nearley": { "version": "2.20.1", "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", + "license": "MIT", "dependencies": { "commander": "^2.19.0", "moo": "^0.5.0", @@ -499,6 +534,7 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -518,14 +554,16 @@ "version": "0.4.2", "resolved": "https://registry.npmjs.org/node-rsa/-/node-rsa-0.4.2.tgz", "integrity": "sha512-Bvso6Zi9LY4otIZefYrscsUpo2mUpiAVIEmSZV2q41sP8tHZoert3Yu6zv4f/RXJqMNZQKCtnhDugIuCma23YA==", + "license": "MIT", "dependencies": { "asn1": "0.2.3" } }, "node_modules/prismarine-auth": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/prismarine-auth/-/prismarine-auth-2.3.0.tgz", - "integrity": "sha512-giKZiHwuQdpMJ7KX94UncOJqM3u+yqKIR2UI/rqmdmFUuQilV9vhlz/zehpVkvo7FE8gmZsuUMCUPhI+gtgd3A==", + "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==", + "license": "MIT", "dependencies": { "@azure/msal-node": "^2.0.2", "@xboxreplay/xboxlive-auth": "^3.3.3", @@ -540,15 +578,17 @@ "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.17.0", - "resolved": "https://registry.npmjs.org/prismarine-block/-/prismarine-block-1.17.0.tgz", - "integrity": "sha512-GawzWU91pH4sLTtMvrRe2wiEbO8hgTRwViCBYoFmmqeJYLiblq4GfXOvclj3rEAEdAAVzRKCQxQHpLJhhLWssg==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/prismarine-block/-/prismarine-block-1.17.1.tgz", + "integrity": "sha512-r1TIn/b5v77BX4a+qd+Yv+4/vZpsC/Jp5ElYxd6++2wpCnqiuxVG7BlS2Eo14vez1M2gt3qoNEl54Hr8qox/rQ==", + "license": "MIT", "dependencies": { "minecraft-data": "^3.38.0", "prismarine-biome": "^1.1.0", @@ -559,20 +599,21 @@ } }, "node_modules/prismarine-chat": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/prismarine-chat/-/prismarine-chat-1.8.0.tgz", - "integrity": "sha512-hEz47GESIEP0W1KSHrK7ZSy0PqbQW7khYWenv8d5wvyAYnBs1E4KXDBJSWqyGIYinKGN9aes8v3xpQhgURK/Fg==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/prismarine-chat/-/prismarine-chat-1.10.1.tgz", + "integrity": "sha512-XukYcuueuhDxzEXG7r8BZyt6jOObrPPB4JESCgb+/XenB9nExoSHF8eTQWWj8faKPLqm1dRQaYwFJlNBlJZJUw==", + "license": "MIT", "dependencies": { "mojangson": "^2.0.1", - "prismarine-item": "^1.10.0", "prismarine-nbt": "^2.0.0", "prismarine-registry": "^1.4.0" } }, "node_modules/prismarine-chunk": { - "version": "1.34.0", - "resolved": "https://registry.npmjs.org/prismarine-chunk/-/prismarine-chunk-1.34.0.tgz", - "integrity": "sha512-5RuQk8w9Ot550G5mmUFZvjpHugEXozgEFXiAhynrBCHOKJ3mMQ7VvhWF2irtjx+d2t29yDAiSEiSS34vxAmODQ==", + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/prismarine-chunk/-/prismarine-chunk-1.35.0.tgz", + "integrity": "sha512-Q1lElMUle7wWxWdQjbZo3j2/dLNG325j90IcbbMmBTnHdQSWIjWFe792XOz3RVBlvrhRJEiZk38S6/eQTQ9esw==", + "license": "MIT", "dependencies": { "prismarine-biome": "^1.2.0", "prismarine-block": "^1.14.1", @@ -588,9 +629,10 @@ } }, "node_modules/prismarine-entity": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/prismarine-entity/-/prismarine-entity-2.3.1.tgz", - "integrity": "sha512-HOv8l7IetHNf4hwZ7V/W4vM3GNl+e6VCtKDkH9h02TRq7jWngsggKtJV+VanCce/sNwtJUhJDjORGs728ep4MA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/prismarine-entity/-/prismarine-entity-2.4.0.tgz", + "integrity": "sha512-DBwjmoCX1IYAhN99KwYkk2rMArn65JHTzuuGXchr4GLWQs7UN4Pf9tELqBwNOu4r57x3RaW0+9+0sI3FvJQWzQ==", + "license": "MIT", "dependencies": { "prismarine-chat": "^1.4.1", "prismarine-item": "^1.11.2", @@ -599,18 +641,20 @@ } }, "node_modules/prismarine-item": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/prismarine-item/-/prismarine-item-1.14.0.tgz", - "integrity": "sha512-udQHYGJ05klFe8Kkc0TOmwoXj5Xl1ZPgHVoMbGUAFB9exN4TFxEa1A39vkSYhxP5Et9PNufQQvFBFVom0nXikA==", + "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.2.1", - "resolved": "https://registry.npmjs.org/prismarine-nbt/-/prismarine-nbt-2.2.1.tgz", - "integrity": "sha512-Mb50c58CPnuZ+qvM31DBa08tf9UumlTq1LkvpMoUpKfCuN05GZHTqCUwER3lxTSHLL0GZKghIPbYR/JQkINijQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/prismarine-nbt/-/prismarine-nbt-2.5.0.tgz", + "integrity": "sha512-F0/8UAa9SDDnAGrBYqZc4nG8h2zj5cE2eAJU5xlDR/IsQQ3moVxkOjE3h3nMv6SbvZrvAcgX7waA/nd9LLHYdA==", + "license": "MIT", "dependencies": { "protodef": "^1.9.0" } @@ -619,6 +663,7 @@ "version": "1.8.0", "resolved": "https://registry.npmjs.org/prismarine-physics/-/prismarine-physics-1.8.0.tgz", "integrity": "sha512-gbM+S+bmVtOKVv+Z0WGaHMeEeBHISIDsRDRlv8sr0dex3ZJRhuq8djA02CBreguXtI18ZKh6q3TSj2qDr45NHA==", + "license": "MIT", "dependencies": { "minecraft-data": "^3.0.0", "prismarine-nbt": "^2.0.0", @@ -629,6 +674,7 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/prismarine-realms/-/prismarine-realms-1.3.2.tgz", "integrity": "sha512-5apl9Ru8veTj5q2OozRc4GZOuSIcs3yY4UEtALiLKHstBe8bRw8vNlaz4Zla3jsQ8yP/ul1b1IJINTRbocuA6g==", + "license": "MIT", "dependencies": { "debug": "^4.3.3", "node-fetch": "^2.6.1" @@ -638,23 +684,26 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/prismarine-recipe/-/prismarine-recipe-1.3.1.tgz", "integrity": "sha512-xfa9E9ACoaDi+YzNQ+nk8kWSIqt5vSZOOCHIT+dTXscf/dng2HaJ/59uwe1D/jvOkAd2OvM6RRJM6fFe0q/LDA==", + "license": "MIT", "peerDependencies": { "prismarine-registry": "^1.4.0" } }, "node_modules/prismarine-registry": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/prismarine-registry/-/prismarine-registry-1.7.0.tgz", - "integrity": "sha512-yyva0FpWI078nNeMhx8ekVza5uUTYhEv+C+ADu3wUQXiG8qhXkvrf0uzsnhTgZL8BLdsi2axgCEiKw9qSKIuxQ==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/prismarine-registry/-/prismarine-registry-1.8.0.tgz", + "integrity": "sha512-BLvvjuVdjp2wQQ6c0wMnc5oszY+dUxCVKvXVBRNK51qYE1X239imzJIRT6gkLC8nFSQR6mtcuOENIBwoIHLs0A==", + "license": "MIT", "dependencies": { - "minecraft-data": "^3.0.0", + "minecraft-data": "^3.70.0", "prismarine-nbt": "^2.0.0" } }, "node_modules/prismarine-windows": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/prismarine-windows/-/prismarine-windows-2.8.0.tgz", - "integrity": "sha512-9HVhJ8tfCeRubYwQzgz8oiHNAebMJ5hDdjm45PZwrOgewaislnR2HDsbPMWiCcyWkYL7J8bVLVoSzEzv5pH98g==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/prismarine-windows/-/prismarine-windows-2.9.0.tgz", + "integrity": "sha512-fm4kOLjGFPov7TEJRmXHoiPabxIQrG36r2mDjlNxfkcLfMHFb3/1ML6mp4iRQa7wL0GK4DIAyiBqCWoeWDxARg==", + "license": "MIT", "dependencies": { "prismarine-item": "^1.12.2", "prismarine-registry": "^1.7.0", @@ -665,17 +714,16 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/typed-emitter/-/typed-emitter-2.1.0.tgz", "integrity": "sha512-g/KzbYKbH5C2vPkaXGu8DJlHrGKHLsM25Zg9WuC9pMGfuvT+X25tZQWo5fK1BjBm8+UrVE9LDCvaY0CQk+fXDA==", - "dependencies": { - "rxjs": "*" - }, + "license": "MIT", "optionalDependencies": { "rxjs": "*" } }, "node_modules/prismarine-world": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/prismarine-world/-/prismarine-world-3.6.2.tgz", - "integrity": "sha512-xNNo3bd8EnCMjiPbVrh3jYa1Upa8Krkb13BgO7FOOfD5ZYf+iYDZewBtDbHYWzZZB2N0JlTtimMOHRhZhDJirw==", + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/prismarine-world/-/prismarine-world-3.6.3.tgz", + "integrity": "sha512-zqdqPEYCDHzqi6hglJldEO63bOROXpbZeIdxBmoQq7o04Lf81t016LU6stFHo3E+bmp5+xU74eDFdOvzYNABkA==", + "license": "MIT", "dependencies": { "vec3": "^0.1.7" }, @@ -687,19 +735,21 @@ "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "license": "MIT", "engines": { "node": ">= 0.6.0" } }, "node_modules/protodef": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/protodef/-/protodef-1.15.0.tgz", - "integrity": "sha512-bZ2Omw8dT+DACjJHLrBWZlqN4MlT9g9oSpJDdkUAJOStUzgJp+Zn42FJfPUdwutUxjaxA0PftN0PDlNa2XbneA==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/protodef/-/protodef-1.17.0.tgz", + "integrity": "sha512-mnpNPV3xwu63u3NwZuXM1RCp979vjHxUGHzVrb6dxbvof5Fx+b8Rs0G0c3xtEuFDreGAMWS7VrlNkDUDBMsFWQ==", + "license": "MIT", "dependencies": { "lodash.get": "^4.4.2", "lodash.reduce": "^4.6.0", "protodef-validator": "^1.3.0", - "readable-stream": "^3.0.3" + "readable-stream": "^4.4.0" }, "engines": { "node": ">=14" @@ -709,6 +759,7 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/protodef-validator/-/protodef-validator-1.3.1.tgz", "integrity": "sha512-lZ5FWKZYR9xOjpMw1+EfZRfCjzNRQWPq+Dk+jki47Sikl2EeWEPnTfnJERwnU/EwFq6us+0zqHHzSsmLeYX+Lg==", + "license": "MIT", "dependencies": { "ajv": "^6.5.4" }, @@ -716,23 +767,11 @@ "protodef-validator": "cli.js" } }, - "node_modules/protodef/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", "engines": { "node": ">=6" } @@ -740,12 +779,14 @@ "node_modules/railroad-diagrams": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", - "integrity": "sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==" + "integrity": "sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==", + "license": "CC0-1.0" }, "node_modules/randexp": { "version": "0.4.6", "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", + "license": "MIT", "dependencies": { "discontinuous-range": "1.0.0", "ret": "~0.1.10" @@ -755,9 +796,10 @@ } }, "node_modules/rcon-client": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/rcon-client/-/rcon-client-4.2.3.tgz", - "integrity": "sha512-g+DEzI3O0Nl4Y3mPp6DHhSpYeiv+wTq8iKxCumFGO0/SMCsdNfx9bpT5RyHa7phR5dvspKfQK0ZYJp1YCtXNng==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/rcon-client/-/rcon-client-4.2.5.tgz", + "integrity": "sha512-AnX1GU/ZTlwtYup3H6h0J1hwfP3OYltXVe+8ReBzmNEepX3xGH8nDg7gYqT5Y9rpAS/LmQ48h0BKINt1YGd8bA==", + "license": "MIT", "dependencies": { "typed-emitter": "^0.1.0" } @@ -765,12 +807,14 @@ "node_modules/rcon-client/node_modules/typed-emitter": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/typed-emitter/-/typed-emitter-0.1.0.tgz", - "integrity": "sha512-Tfay0l6gJMP5rkil8CzGbLthukn+9BN/VXWcABVFPjOoelJ+koW8BuPZYk+h/L+lEeIp1fSzVRiWRPIjKVjPdg==" + "integrity": "sha512-Tfay0l6gJMP5rkil8CzGbLthukn+9BN/VXWcABVFPjOoelJ+koW8BuPZYk+h/L+lEeIp1fSzVRiWRPIjKVjPdg==", + "license": "MIT" }, "node_modules/readable-stream": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.4.2.tgz", - "integrity": "sha512-Lk/fICSyIhodxy1IDK2HazkeGjSmezAWX2egdtJnYhtzKEsBPJowlI6F6LPb5tqIQILrMbx22S5o3GuJavPusA==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", "buffer": "^6.0.3", @@ -786,6 +830,7 @@ "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "license": "MIT", "engines": { "node": ">=0.12" } @@ -794,6 +839,7 @@ "version": "7.8.1", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "license": "Apache-2.0", "optional": true, "dependencies": { "tslib": "^2.1.0" @@ -802,15 +848,14 @@ "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -822,6 +867,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "license": "MIT", "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" @@ -831,6 +877,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" } @@ -852,51 +899,54 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "license": "0BSD", "optional": true }, "node_modules/typed-emitter": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/typed-emitter/-/typed-emitter-1.4.0.tgz", - "integrity": "sha512-weBmoo3HhpKGgLBOYwe8EB31CzDFuaK7CCL+axXhUYhn4jo6DSkHnbefboCF5i4DQ2aMFe0C/FdTWcPdObgHyg==" + "integrity": "sha512-weBmoo3HhpKGgLBOYwe8EB31CzDFuaK7CCL+axXhUYhn4jo6DSkHnbefboCF5i4DQ2aMFe0C/FdTWcPdObgHyg==", + "license": "MIT" }, "node_modules/uint4": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/uint4/-/uint4-0.1.2.tgz", - "integrity": "sha512-lhEx78gdTwFWG+mt6cWAZD/R6qrIj0TTBeH5xwyuDJyswLNlGe+KVlUPQ6+mx5Ld332pS0AMUTo9hIly7YsWxQ==" + "integrity": "sha512-lhEx78gdTwFWG+mt6cWAZD/R6qrIj0TTBeH5xwyuDJyswLNlGe+KVlUPQ6+mx5Ld332pS0AMUTo9hIly7YsWxQ==", + "license": "MIT" }, "node_modules/undici-types": { - "version": "5.25.3", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", - "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==" + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "license": "MIT" }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } @@ -905,24 +955,28 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/uuid-1345/-/uuid-1345-1.0.2.tgz", "integrity": "sha512-bA5zYZui+3nwAc0s3VdGQGBfbVsJLVX7Np7ch2aqcEWFi5lsAEcmO3+lx3djM1npgpZI8KY2FITZ2uYTnYUYyw==", + "license": "MIT", "dependencies": { "macaddress": "^0.5.1" } }, "node_modules/vec3": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/vec3/-/vec3-0.1.8.tgz", - "integrity": "sha512-LfKrP625Bsg/Tj52YdYPsHmpsJuo+tc6fLxZxXjEo9k2xSspKlPvoYTHehykKhp1FvV9nm+XU3Ehej5/9tpDCg==" + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/vec3/-/vec3-0.1.10.tgz", + "integrity": "sha512-Sr1U3mYtMqCOonGd3LAN9iqy0qF6C+Gjil92awyK/i2OwiUo9bm7PnLgFpafymun50mOjnDcg4ToTgRssrlTcw==", + "license": "BSD" }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -931,777 +985,18 @@ "node_modules/xxhash-wasm": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-0.4.2.tgz", - "integrity": "sha512-/eyHVRJQCirEkSZ1agRSCwriMhwlyUcFkXD5TPVSLP+IPzjsqMVzZwdoczLp1SoQU0R3dxz1RpIK+4YNQbCVOA==" - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "integrity": "sha512-/eyHVRJQCirEkSZ1agRSCwriMhwlyUcFkXD5TPVSLP+IPzjsqMVzZwdoczLp1SoQU0R3dxz1RpIK+4YNQbCVOA==", + "license": "MIT" }, "node_modules/yggdrasil": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/yggdrasil/-/yggdrasil-1.7.0.tgz", "integrity": "sha512-QBIo5fiNd7688G3FqXXYGr36uyrYzczlNuzpWFy2zL3+R+3KT2lF+wFxm51synfA3l3z6IBiGOc1/EVXWCYY1Q==", + "license": "MIT", "dependencies": { "node-fetch": "^2.6.1", "uuid": "^8.2.0" } } - }, - "dependencies": { - "@azure/msal-common": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.1.0.tgz", - "integrity": "sha512-xphmhcfl5VL+uq5//VKMwQn+wfEZLMKNpFCcMi8Ur8ej5UT166g6chBsxgMzc9xo9Y24R9FB3m/tjDiV03xMIA==" - }, - "@azure/msal-node": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.2.0.tgz", - "integrity": "sha512-aZZ1m7OATOR9kz7+/Kl+/LZrNEj+HYaEH84XZfnBtN/9JPRazngk1XTjvAkh7W1u/O/yQrlYiiSwSAKHnNBc8A==", - "requires": { - "@azure/msal-common": "14.1.0", - "jsonwebtoken": "^9.0.0", - "uuid": "^8.3.0" - } - }, - "@types/node": { - "version": "20.8.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.6.tgz", - "integrity": "sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ==", - "requires": { - "undici-types": "~5.25.1" - } - }, - "@types/readable-stream": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.3.tgz", - "integrity": "sha512-Z8BOzyIj3UPpn3j5DmDNKIw4wPN9N8a1d1oyteiprWq+wxdgQNC0UfFAQwWjmjyA7uoj7mvoWgxWWH66zYtm4Q==", - "requires": { - "@types/node": "*", - "safe-buffer": "~5.1.1" - } - }, - "@xboxreplay/errors": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@xboxreplay/errors/-/errors-0.1.0.tgz", - "integrity": "sha512-Tgz1d/OIPDWPeyOvuL5+aai5VCcqObhPnlI3skQuf80GVF3k1I0lPCnGC+8Cm5PV9aLBT5m8qPcJoIUQ2U4y9g==" - }, - "@xboxreplay/xboxlive-auth": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/@xboxreplay/xboxlive-auth/-/xboxlive-auth-3.3.3.tgz", - "integrity": "sha512-j0AU8pW10LM8O68CTZ5QHnvOjSsnPICy0oQcP7zyM7eWkDQ/InkiQiirQKsPn1XRYDl4ccNu0WM582s3UKwcBg==", - "requires": { - "@xboxreplay/errors": "^0.1.0", - "axios": "^0.21.1" - } - }, - "abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "requires": { - "event-target-shim": "^5.0.0" - } - }, - "aes-js": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", - "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==" - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha512-6i37w/+EhlWlGUJff3T/Q8u1RGmP5wgbiwYnOnbOqvtrPxT63/sYFyP9RcpxtxGymtfA075IvmOnL7ycNOWl3w==" - }, - "axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "requires": { - "follow-redirects": "^1.14.0" - } - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "buffer-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.1.tgz", - "integrity": "sha512-QoV3ptgEaQpvVwbXdSO39iqPQTCxSF7A5U99AxbHYqUdCizL/lH2Z0A2y6nbZucxMEOtNyZfG2s6gsVugGpKkg==" - }, - "buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, - "discontinuous-range": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", - "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==" - }, - "ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "endian-toggle": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/endian-toggle/-/endian-toggle-0.0.0.tgz", - "integrity": "sha512-ShfqhXeHRE4TmggSlHXG8CMGIcsOsqDw/GcoPcosToE59Rm9e4aXaMhEQf2kPBsBRrKem1bbOAv5gOKnkliMFQ==" - }, - "event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" - }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "follow-redirects": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==" - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "jose": { - "version": "4.15.3", - "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.3.tgz", - "integrity": "sha512-RZJdL9Qjd1sqNdyiVteRGV/bnWtik/+PJh1JP4kT6+x1QQMn+7ryueRys5BEueuayvSVY8CWGCisCDazeRLTuw==" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "jsonwebtoken": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", - "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", - "requires": { - "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", - "ms": "^2.1.1", - "semver": "^7.5.4" - } - }, - "jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "requires": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "requires": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" - } - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==" - }, - "lodash.includes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" - }, - "lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" - }, - "lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" - }, - "lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" - }, - "lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" - }, - "lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" - }, - "lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" - }, - "lodash.reduce": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", - "integrity": "sha512-6raRe2vxCYBhpBu+B+TtNGUzah+hQjVdu3E17wfusjyrXBka2nBS8OH/gjVZ5PvHOhWmIZTYri09Z6n/QfnNMw==" - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - }, - "macaddress": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/macaddress/-/macaddress-0.5.3.tgz", - "integrity": "sha512-vGBKTA+jwM4KgjGZ+S/8/Mkj9rWzePyGY6jManXPGhiWu63RYwW8dKPyk5koP+8qNVhPhHgFa1y/MJ4wrjsNrg==" - }, - "minecraft-data": { - "version": "3.46.2", - "resolved": "https://registry.npmjs.org/minecraft-data/-/minecraft-data-3.46.2.tgz", - "integrity": "sha512-vunI/l5mqjU7FisB5iFxcNl6BkKLzELUvsP5P4gpUOAUtTWXEUYTnVg9jdIFOl7Y2zw3TxG2RHDa0h0ScnRCEA==" - }, - "minecraft-folder-path": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minecraft-folder-path/-/minecraft-folder-path-1.2.0.tgz", - "integrity": "sha512-qaUSbKWoOsH9brn0JQuBhxNAzTDMwrOXorwuRxdJKKKDYvZhtml+6GVCUrY5HRiEsieBEjCUnhVpDuQiKsiFaw==" - }, - "minecraft-protocol": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/minecraft-protocol/-/minecraft-protocol-1.44.0.tgz", - "integrity": "sha512-sYu4fFzUKt3spPG5tAdkaB9sNQPT0sV6fyS0sS7/nxdzFfjmLhF6BLNC+32ieK4/MhgNyHtH6xusD0Bi0Roq9w==", - "requires": { - "@types/readable-stream": "^4.0.0", - "aes-js": "^3.1.2", - "buffer-equal": "^1.0.0", - "debug": "^4.3.2", - "endian-toggle": "^0.0.0", - "lodash.get": "^4.1.2", - "lodash.merge": "^4.3.0", - "minecraft-data": "^3.37.0", - "minecraft-folder-path": "^1.2.0", - "node-fetch": "^2.6.1", - "node-rsa": "^0.4.2", - "prismarine-auth": "^2.2.0", - "prismarine-nbt": "^2.0.0", - "prismarine-realms": "^1.2.0", - "protodef": "^1.8.0", - "readable-stream": "^4.1.0", - "uuid-1345": "^1.0.1", - "yggdrasil": "^1.4.0" - } - }, - "mineflayer": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/mineflayer/-/mineflayer-4.14.0.tgz", - "integrity": "sha512-4EYzUmZNxH3Gpz3GkgO2eaR90ANb50nVhMCU2y6Rl1Ru8M6HqxID1Eg7tRgsodfAOD+AKh5SPwmPnISLcxvnOA==", - "requires": { - "minecraft-data": "^3.44.0", - "minecraft-protocol": "^1.44.0", - "prismarine-biome": "^1.1.1", - "prismarine-block": "^1.17.0", - "prismarine-chat": "^1.7.1", - "prismarine-chunk": "^1.34.0", - "prismarine-entity": "^2.3.0", - "prismarine-item": "^1.14.0", - "prismarine-nbt": "^2.0.0", - "prismarine-physics": "^1.8.0", - "prismarine-recipe": "^1.3.0", - "prismarine-registry": "^1.5.0", - "prismarine-windows": "^2.8.0", - "prismarine-world": "^3.6.0", - "protodef": "^1.14.0", - "typed-emitter": "^1.0.0", - "vec3": "^0.1.7" - } - }, - "mojangson": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/mojangson/-/mojangson-2.0.4.tgz", - "integrity": "sha512-HYmhgDjr1gzF7trGgvcC/huIg2L8FsVbi/KacRe6r1AswbboGVZDS47SOZlomPuMWvZLas8m9vuHHucdZMwTmQ==", - "requires": { - "nearley": "^2.19.5" - } - }, - "moo": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", - "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==" - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "nearley": { - "version": "2.20.1", - "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", - "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", - "requires": { - "commander": "^2.19.0", - "moo": "^0.5.0", - "railroad-diagrams": "^1.0.0", - "randexp": "0.4.6" - } - }, - "node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "requires": { - "whatwg-url": "^5.0.0" - } - }, - "node-rsa": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/node-rsa/-/node-rsa-0.4.2.tgz", - "integrity": "sha512-Bvso6Zi9LY4otIZefYrscsUpo2mUpiAVIEmSZV2q41sP8tHZoert3Yu6zv4f/RXJqMNZQKCtnhDugIuCma23YA==", - "requires": { - "asn1": "0.2.3" - } - }, - "prismarine-auth": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/prismarine-auth/-/prismarine-auth-2.3.0.tgz", - "integrity": "sha512-giKZiHwuQdpMJ7KX94UncOJqM3u+yqKIR2UI/rqmdmFUuQilV9vhlz/zehpVkvo7FE8gmZsuUMCUPhI+gtgd3A==", - "requires": { - "@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" - } - }, - "prismarine-biome": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/prismarine-biome/-/prismarine-biome-1.3.0.tgz", - "integrity": "sha512-GY6nZxq93mTErT7jD7jt8YS1aPrOakbJHh39seYsJFXvueIOdHAmW16kYQVrTVMW5MlWLQVxV/EquRwOgr4MnQ==", - "requires": {} - }, - "prismarine-block": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/prismarine-block/-/prismarine-block-1.17.0.tgz", - "integrity": "sha512-GawzWU91pH4sLTtMvrRe2wiEbO8hgTRwViCBYoFmmqeJYLiblq4GfXOvclj3rEAEdAAVzRKCQxQHpLJhhLWssg==", - "requires": { - "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" - } - }, - "prismarine-chat": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/prismarine-chat/-/prismarine-chat-1.8.0.tgz", - "integrity": "sha512-hEz47GESIEP0W1KSHrK7ZSy0PqbQW7khYWenv8d5wvyAYnBs1E4KXDBJSWqyGIYinKGN9aes8v3xpQhgURK/Fg==", - "requires": { - "mojangson": "^2.0.1", - "prismarine-item": "^1.10.0", - "prismarine-nbt": "^2.0.0", - "prismarine-registry": "^1.4.0" - } - }, - "prismarine-chunk": { - "version": "1.34.0", - "resolved": "https://registry.npmjs.org/prismarine-chunk/-/prismarine-chunk-1.34.0.tgz", - "integrity": "sha512-5RuQk8w9Ot550G5mmUFZvjpHugEXozgEFXiAhynrBCHOKJ3mMQ7VvhWF2irtjx+d2t29yDAiSEiSS34vxAmODQ==", - "requires": { - "prismarine-biome": "^1.2.0", - "prismarine-block": "^1.14.1", - "prismarine-nbt": "^2.2.1", - "prismarine-registry": "^1.1.0", - "smart-buffer": "^4.1.0", - "uint4": "^0.1.2", - "vec3": "^0.1.3", - "xxhash-wasm": "^0.4.2" - } - }, - "prismarine-entity": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/prismarine-entity/-/prismarine-entity-2.3.1.tgz", - "integrity": "sha512-HOv8l7IetHNf4hwZ7V/W4vM3GNl+e6VCtKDkH9h02TRq7jWngsggKtJV+VanCce/sNwtJUhJDjORGs728ep4MA==", - "requires": { - "prismarine-chat": "^1.4.1", - "prismarine-item": "^1.11.2", - "prismarine-registry": "^1.4.0", - "vec3": "^0.1.4" - } - }, - "prismarine-item": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/prismarine-item/-/prismarine-item-1.14.0.tgz", - "integrity": "sha512-udQHYGJ05klFe8Kkc0TOmwoXj5Xl1ZPgHVoMbGUAFB9exN4TFxEa1A39vkSYhxP5Et9PNufQQvFBFVom0nXikA==", - "requires": { - "prismarine-nbt": "^2.0.0", - "prismarine-registry": "^1.4.0" - } - }, - "prismarine-nbt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prismarine-nbt/-/prismarine-nbt-2.2.1.tgz", - "integrity": "sha512-Mb50c58CPnuZ+qvM31DBa08tf9UumlTq1LkvpMoUpKfCuN05GZHTqCUwER3lxTSHLL0GZKghIPbYR/JQkINijQ==", - "requires": { - "protodef": "^1.9.0" - } - }, - "prismarine-physics": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/prismarine-physics/-/prismarine-physics-1.8.0.tgz", - "integrity": "sha512-gbM+S+bmVtOKVv+Z0WGaHMeEeBHISIDsRDRlv8sr0dex3ZJRhuq8djA02CBreguXtI18ZKh6q3TSj2qDr45NHA==", - "requires": { - "minecraft-data": "^3.0.0", - "prismarine-nbt": "^2.0.0", - "vec3": "^0.1.7" - } - }, - "prismarine-realms": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/prismarine-realms/-/prismarine-realms-1.3.2.tgz", - "integrity": "sha512-5apl9Ru8veTj5q2OozRc4GZOuSIcs3yY4UEtALiLKHstBe8bRw8vNlaz4Zla3jsQ8yP/ul1b1IJINTRbocuA6g==", - "requires": { - "debug": "^4.3.3", - "node-fetch": "^2.6.1" - } - }, - "prismarine-recipe": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/prismarine-recipe/-/prismarine-recipe-1.3.1.tgz", - "integrity": "sha512-xfa9E9ACoaDi+YzNQ+nk8kWSIqt5vSZOOCHIT+dTXscf/dng2HaJ/59uwe1D/jvOkAd2OvM6RRJM6fFe0q/LDA==", - "requires": {} - }, - "prismarine-registry": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/prismarine-registry/-/prismarine-registry-1.7.0.tgz", - "integrity": "sha512-yyva0FpWI078nNeMhx8ekVza5uUTYhEv+C+ADu3wUQXiG8qhXkvrf0uzsnhTgZL8BLdsi2axgCEiKw9qSKIuxQ==", - "requires": { - "minecraft-data": "^3.0.0", - "prismarine-nbt": "^2.0.0" - } - }, - "prismarine-windows": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/prismarine-windows/-/prismarine-windows-2.8.0.tgz", - "integrity": "sha512-9HVhJ8tfCeRubYwQzgz8oiHNAebMJ5hDdjm45PZwrOgewaislnR2HDsbPMWiCcyWkYL7J8bVLVoSzEzv5pH98g==", - "requires": { - "prismarine-item": "^1.12.2", - "prismarine-registry": "^1.7.0", - "typed-emitter": "^2.1.0" - }, - "dependencies": { - "typed-emitter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/typed-emitter/-/typed-emitter-2.1.0.tgz", - "integrity": "sha512-g/KzbYKbH5C2vPkaXGu8DJlHrGKHLsM25Zg9WuC9pMGfuvT+X25tZQWo5fK1BjBm8+UrVE9LDCvaY0CQk+fXDA==", - "requires": { - "rxjs": "*" - } - } - } - }, - "prismarine-world": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/prismarine-world/-/prismarine-world-3.6.2.tgz", - "integrity": "sha512-xNNo3bd8EnCMjiPbVrh3jYa1Upa8Krkb13BgO7FOOfD5ZYf+iYDZewBtDbHYWzZZB2N0JlTtimMOHRhZhDJirw==", - "requires": { - "vec3": "^0.1.7" - } - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" - }, - "protodef": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/protodef/-/protodef-1.15.0.tgz", - "integrity": "sha512-bZ2Omw8dT+DACjJHLrBWZlqN4MlT9g9oSpJDdkUAJOStUzgJp+Zn42FJfPUdwutUxjaxA0PftN0PDlNa2XbneA==", - "requires": { - "lodash.get": "^4.4.2", - "lodash.reduce": "^4.6.0", - "protodef-validator": "^1.3.0", - "readable-stream": "^3.0.3" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "protodef-validator": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/protodef-validator/-/protodef-validator-1.3.1.tgz", - "integrity": "sha512-lZ5FWKZYR9xOjpMw1+EfZRfCjzNRQWPq+Dk+jki47Sikl2EeWEPnTfnJERwnU/EwFq6us+0zqHHzSsmLeYX+Lg==", - "requires": { - "ajv": "^6.5.4" - } - }, - "punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==" - }, - "railroad-diagrams": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", - "integrity": "sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==" - }, - "randexp": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", - "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", - "requires": { - "discontinuous-range": "1.0.0", - "ret": "~0.1.10" - } - }, - "rcon-client": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/rcon-client/-/rcon-client-4.2.3.tgz", - "integrity": "sha512-g+DEzI3O0Nl4Y3mPp6DHhSpYeiv+wTq8iKxCumFGO0/SMCsdNfx9bpT5RyHa7phR5dvspKfQK0ZYJp1YCtXNng==", - "requires": { - "typed-emitter": "^0.1.0" - }, - "dependencies": { - "typed-emitter": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/typed-emitter/-/typed-emitter-0.1.0.tgz", - "integrity": "sha512-Tfay0l6gJMP5rkil8CzGbLthukn+9BN/VXWcABVFPjOoelJ+koW8BuPZYk+h/L+lEeIp1fSzVRiWRPIjKVjPdg==" - } - } - }, - "readable-stream": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.4.2.tgz", - "integrity": "sha512-Lk/fICSyIhodxy1IDK2HazkeGjSmezAWX2egdtJnYhtzKEsBPJowlI6F6LPb5tqIQILrMbx22S5o3GuJavPusA==", - "requires": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10", - "string_decoder": "^1.3.0" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" - }, - "rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", - "optional": true, - "requires": { - "tslib": "^2.1.0" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - } - } - }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "optional": true - }, - "typed-emitter": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/typed-emitter/-/typed-emitter-1.4.0.tgz", - "integrity": "sha512-weBmoo3HhpKGgLBOYwe8EB31CzDFuaK7CCL+axXhUYhn4jo6DSkHnbefboCF5i4DQ2aMFe0C/FdTWcPdObgHyg==" - }, - "uint4": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/uint4/-/uint4-0.1.2.tgz", - "integrity": "sha512-lhEx78gdTwFWG+mt6cWAZD/R6qrIj0TTBeH5xwyuDJyswLNlGe+KVlUPQ6+mx5Ld332pS0AMUTo9hIly7YsWxQ==" - }, - "undici-types": { - "version": "5.25.3", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", - "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==" - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" - }, - "uuid-1345": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uuid-1345/-/uuid-1345-1.0.2.tgz", - "integrity": "sha512-bA5zYZui+3nwAc0s3VdGQGBfbVsJLVX7Np7ch2aqcEWFi5lsAEcmO3+lx3djM1npgpZI8KY2FITZ2uYTnYUYyw==", - "requires": { - "macaddress": "^0.5.1" - } - }, - "vec3": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/vec3/-/vec3-0.1.8.tgz", - "integrity": "sha512-LfKrP625Bsg/Tj52YdYPsHmpsJuo+tc6fLxZxXjEo9k2xSspKlPvoYTHehykKhp1FvV9nm+XU3Ehej5/9tpDCg==" - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "xxhash-wasm": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-0.4.2.tgz", - "integrity": "sha512-/eyHVRJQCirEkSZ1agRSCwriMhwlyUcFkXD5TPVSLP+IPzjsqMVzZwdoczLp1SoQU0R3dxz1RpIK+4YNQbCVOA==" - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "yggdrasil": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/yggdrasil/-/yggdrasil-1.7.0.tgz", - "integrity": "sha512-QBIo5fiNd7688G3FqXXYGr36uyrYzczlNuzpWFy2zL3+R+3KT2lF+wFxm51synfA3l3z6IBiGOc1/EVXWCYY1Q==", - "requires": { - "node-fetch": "^2.6.1", - "uuid": "^8.2.0" - } - } } } diff --git a/automata/package.json b/automata/package.json index 723c211..2e661a4 100644 --- a/automata/package.json +++ b/automata/package.json @@ -6,7 +6,7 @@ "start": "node index.js" }, "dependencies": { - "mineflayer": "^4.14.0", - "rcon-client": "^4.2.3" + "mineflayer": "^4.21.0", + "rcon-client": "^4.2.5" } } diff --git a/automata/src/bot.js b/automata/src/bot.js index 0e4c829..8f4ca06 100644 --- a/automata/src/bot.js +++ b/automata/src/bot.js @@ -7,7 +7,7 @@ export function startBot() { return new Promise(resolve => { const bot = mineflayer.createBot({ host: '127.0.0.1', - username: 'test' + username: 'test', }) bot.once('spawn', () => resolve(bot)) }) @@ -23,6 +23,6 @@ export function placeBlockOnTheFloor(bot) { hand: 0, cursorX: 0, cursorY: 0, - cursorZ: 0 + cursorZ: 0, }) } diff --git a/automata/src/rcon.js b/automata/src/rcon.js index 4c8d07b..a20a0ce 100644 --- a/automata/src/rcon.js +++ b/automata/src/rcon.js @@ -5,7 +5,7 @@ const CONNECTION = { host: '127.0.0.1', port: 25575, password: 'rcon', - timeout: 1000*20 + timeout: 1000*20, } export async function waitForServer() { diff --git a/pom.xml b/pom.xml index a1c60b5..aa29613 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.josemmo.bukkit.plugin YamipaPlugin - 1.3.1 + 1.3.2 8 @@ -42,15 +42,15 @@ org.spigotmc spigot-api - 1.20.4-R0.1-SNAPSHOT + 1.21.1-R0.1-SNAPSHOT provided - + - com.comphenix.protocol + com.github.dmulloy2 ProtocolLib - 5.2.0-SNAPSHOT + 1e3fa2d36e provided @@ -66,7 +66,7 @@ org.bstats bstats-bukkit - 3.0.2 + 3.1.0 @@ -93,27 +93,27 @@ provided - + - com.github.TechFortress + com.github.GriefPrevention GriefPrevention - 16.18.2 + 16.18.4 provided - com.github.TownyAdvanced + com.github.TownyAdvanced.Towny towny - 0.100.1.17 + 0.100.4.4 provided - com.github.angeschossen + com.github.Angeschossen LandsAPI - 6.44.10 + 7.9.17 provided @@ -121,7 +121,7 @@ org.jetbrains annotations - 24.1.0 + 26.0.0 provided diff --git a/src/main/java/io/josemmo/bukkit/plugin/packets/EntityMetadataPacket.java b/src/main/java/io/josemmo/bukkit/plugin/packets/EntityMetadataPacket.java index 02860e8..b33684b 100644 --- a/src/main/java/io/josemmo/bukkit/plugin/packets/EntityMetadataPacket.java +++ b/src/main/java/io/josemmo/bukkit/plugin/packets/EntityMetadataPacket.java @@ -20,7 +20,7 @@ public class EntityMetadataPacket extends PacketContainer { private final List values = new ArrayList<>(); // For >= 1.19.3 static { - USE_DATA_WATCHER = (Internals.MINECRAFT_VERSION < 19.3f); + USE_DATA_WATCHER = (Internals.MINECRAFT_VERSION < 19.3); ITEM_INDEX = (Internals.MINECRAFT_VERSION < 17) ? 7 : 8; ROTATION_INDEX = ITEM_INDEX + 1; } diff --git a/src/main/java/io/josemmo/bukkit/plugin/packets/MapDataPacket.java b/src/main/java/io/josemmo/bukkit/plugin/packets/MapDataPacket.java index 734e16f..1fb3496 100644 --- a/src/main/java/io/josemmo/bukkit/plugin/packets/MapDataPacket.java +++ b/src/main/java/io/josemmo/bukkit/plugin/packets/MapDataPacket.java @@ -2,17 +2,30 @@ import com.comphenix.protocol.PacketType; import com.comphenix.protocol.events.PacketContainer; +import com.comphenix.protocol.injector.StructureCache; +import com.comphenix.protocol.reflect.ExactReflection; import com.comphenix.protocol.reflect.StructureModifier; +import com.comphenix.protocol.utility.MinecraftReflection; import io.josemmo.bukkit.plugin.utils.Internals; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.lang.reflect.Constructor; +import java.lang.reflect.ParameterizedType; +import java.util.Optional; public class MapDataPacket extends PacketContainer { private static final int LOCKED_INDEX; + private static final @Nullable Constructor MAP_ID_CONSTRUCTOR; private @Nullable StructureModifier mapDataModifier; static { LOCKED_INDEX = (Internals.MINECRAFT_VERSION < 17) ? 1 : 0; + if (Internals.MINECRAFT_VERSION < 20.5) { + MAP_ID_CONSTRUCTOR = null; + } else { + Class mapIdClass = MinecraftReflection.getNullableNMS("world.level.saveddata.maps.MapId"); + MAP_ID_CONSTRUCTOR = ExactReflection.fromClass(mapIdClass, true).findConstructor(int.class); + } } public MapDataPacket() { @@ -20,18 +33,34 @@ public MapDataPacket() { getModifier().writeDefaults(); if (Internals.MINECRAFT_VERSION < 17) { - // Disable tracking position - getBooleans().write(0, false); - } else { - // Create modifier for map data instance + getBooleans().write(0, false); // Disable tracking position + } else if (Internals.MINECRAFT_VERSION < 20.5) { Class mapDataType = getModifier().getField(4).getType(); Object mapDataInstance = getModifier().read(4); mapDataModifier = new StructureModifier<>(mapDataType).withTarget(mapDataInstance); + } else { + ParameterizedType genericType = (ParameterizedType) getModifier().getField(4).getGenericType(); + Class mapDataType = (Class) genericType.getActualTypeArguments()[0]; + Object mapDataInstance = StructureCache.newInstance(mapDataType); + getModifier().write(3, Optional.empty()); + getModifier().write(4, Optional.of(mapDataInstance)); + mapDataModifier = new StructureModifier<>(mapDataType).withTarget(mapDataInstance); } } + @SuppressWarnings({"unchecked", "rawtypes"}) public @NotNull MapDataPacket setId(int id) { - getIntegers().write(0, id); + if (MAP_ID_CONSTRUCTOR == null) { + getIntegers().write(0, id); + } else { + try { + Class mapIdClass = MAP_ID_CONSTRUCTOR.getDeclaringClass(); + Object mapIdInstance = MAP_ID_CONSTRUCTOR.newInstance(id); + ((StructureModifier) getSpecificModifier(mapIdClass)).write(0, mapIdInstance); + } catch (Exception e) { + throw new RuntimeException("Failed to instantiate MapId for map #" + id); + } + } return this; } diff --git a/src/main/java/io/josemmo/bukkit/plugin/renderer/FakeEntity.java b/src/main/java/io/josemmo/bukkit/plugin/renderer/FakeEntity.java index 906ae32..f39783b 100644 --- a/src/main/java/io/josemmo/bukkit/plugin/renderer/FakeEntity.java +++ b/src/main/java/io/josemmo/bukkit/plugin/renderer/FakeEntity.java @@ -4,7 +4,7 @@ import com.comphenix.protocol.ProtocolLibrary; import com.comphenix.protocol.ProtocolManager; import com.comphenix.protocol.events.PacketContainer; -import com.comphenix.protocol.injector.player.PlayerInjectionHandler; +import com.comphenix.protocol.injector.netty.manager.NetworkManagerInjector; import com.comphenix.protocol.wrappers.WrappedDataWatcher; import io.josemmo.bukkit.plugin.YamipaPlugin; import io.josemmo.bukkit.plugin.utils.Internals; @@ -17,23 +17,23 @@ public abstract class FakeEntity { private static final Logger LOGGER = Logger.getLogger("FakeEntity"); private static final ProtocolManager CONNECTION = ProtocolLibrary.getProtocolManager(); - private static @Nullable PlayerInjectionHandler PLAYER_INJECTION_HANDLER; + private static @Nullable NetworkManagerInjector NETWORK_MANAGER_INJECTOR; private static boolean READY = false; static { try { for (Field field : CONNECTION.getClass().getDeclaredFields()) { - if (field.getType().equals(PlayerInjectionHandler.class)) { + if (field.getType().equals(NetworkManagerInjector.class)) { field.setAccessible(true); - PLAYER_INJECTION_HANDLER = (PlayerInjectionHandler) field.get(CONNECTION); + NETWORK_MANAGER_INJECTOR = (NetworkManagerInjector) field.get(CONNECTION); break; } } - if (PLAYER_INJECTION_HANDLER == null) { + if (NETWORK_MANAGER_INJECTOR == null) { throw new RuntimeException("No valid candidate field found in ProtocolManager"); } } catch (Exception e) { - LOGGER.severe("Failed to get PlayerInjectionHandler from ProtocolLib", e); + LOGGER.severe("Failed to get NetworkManagerInjector from ProtocolLib", e); } } @@ -85,10 +85,14 @@ protected static void tryToSleep(long ms) { */ protected static void tryToSendPacket(@NotNull Player player, @NotNull PacketContainer packet) { try { - if (PLAYER_INJECTION_HANDLER == null) { // Use single-threaded packet sending if reflection failed + if (NETWORK_MANAGER_INJECTOR == null) { // Use single-threaded packet sending if reflection failed CONNECTION.sendServerPacket(player, packet); } else { // Use non-blocking packet sending if available (faster, the expected case) - PLAYER_INJECTION_HANDLER.sendServerPacket(player, packet, null, false); + NETWORK_MANAGER_INJECTOR.getInjector(player).sendClientboundPacket( + packet.getHandle(), + null, + false + ); } } catch (IllegalStateException e) { // Server is shutting down and cannot send the packet, ignore @@ -103,7 +107,7 @@ protected static void tryToSendPacket(@NotNull Player player, @NotNull PacketCon * @param packets Packets to send */ protected static void tryToSendPackets(@NotNull Player player, @NotNull Iterable packets) { - if (Internals.MINECRAFT_VERSION < 19.4f) { + if (Internals.MINECRAFT_VERSION < 19.4) { for (PacketContainer packet : packets) { tryToSendPacket(player, packet); } diff --git a/src/main/java/io/josemmo/bukkit/plugin/renderer/FakeItemFrame.java b/src/main/java/io/josemmo/bukkit/plugin/renderer/FakeItemFrame.java index 377bbfc..dd1e751 100644 --- a/src/main/java/io/josemmo/bukkit/plugin/renderer/FakeItemFrame.java +++ b/src/main/java/io/josemmo/bukkit/plugin/renderer/FakeItemFrame.java @@ -1,9 +1,6 @@ package io.josemmo.bukkit.plugin.renderer; import com.comphenix.protocol.events.PacketContainer; -import com.comphenix.protocol.utility.MinecraftReflection; -import com.comphenix.protocol.wrappers.nbt.NbtCompound; -import com.comphenix.protocol.wrappers.nbt.NbtFactory; import io.josemmo.bukkit.plugin.packets.DestroyEntityPacket; import io.josemmo.bukkit.plugin.packets.EntityMetadataPacket; import io.josemmo.bukkit.plugin.packets.SpawnEntityPacket; @@ -16,9 +13,11 @@ import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.MapMeta; import org.jetbrains.annotations.NotNull; import java.util.ArrayList; import java.util.List; +import java.util.Objects; import java.util.concurrent.atomic.AtomicInteger; public class FakeItemFrame extends FakeEntity { @@ -137,6 +136,7 @@ public int getId() { * @param player Player who is expected to receive packets (for caching reasons) * @param step Map step */ + @SuppressWarnings("deprecation") public @NotNull List getRenderPackets(@NotNull Player player, int step) { List packets = new ArrayList<>(2); @@ -147,10 +147,10 @@ public int getId() { } // Create and attach filled map - ItemStack itemStack = MinecraftReflection.getBukkitItemStack(new ItemStack(Material.FILLED_MAP)); - NbtCompound itemStackNbt = NbtFactory.ofCompound("tag"); - itemStackNbt.put("map", maps[step].getId()); - NbtFactory.setItemTag(itemStack, itemStackNbt); + ItemStack itemStack = new ItemStack(Material.FILLED_MAP); + MapMeta itemStackMeta = Objects.requireNonNull((MapMeta) itemStack.getItemMeta()); + itemStackMeta.setMapId(maps[step].getId()); + itemStack.setItemMeta(itemStackMeta); // Build entity metadata packet EntityMetadataPacket metadataPacket = new EntityMetadataPacket(); diff --git a/src/main/java/io/josemmo/bukkit/plugin/storage/FileSystemWatcher.java b/src/main/java/io/josemmo/bukkit/plugin/storage/FileSystemWatcher.java new file mode 100644 index 0000000..09ba535 --- /dev/null +++ b/src/main/java/io/josemmo/bukkit/plugin/storage/FileSystemWatcher.java @@ -0,0 +1,326 @@ +package io.josemmo.bukkit.plugin.storage; + +import com.sun.nio.file.ExtendedWatchEventModifier; +import io.josemmo.bukkit.plugin.utils.Logger; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import java.io.File; +import java.io.IOException; +import java.nio.file.*; +import java.nio.file.attribute.BasicFileAttributes; +import java.util.*; +import java.util.stream.Collectors; + +/** + * Service for detecting file events inside a given directory. + *

+ * It supports recursive storage (e.g., nested directories) and watches for file system changes in realtime + * when supported by the OS. + */ +public abstract class FileSystemWatcher { + private static final int MAX_DEPTH = 32; + private static final int POLLING_INTERVAL = 4000; + private static final String PROBE_FILENAME = ".inotify_test"; + private static final Logger LOGGER = Logger.getLogger("FileSystemWatcher"); + protected final Path basePath; + /** Map of existing directories with the files they contain and their last modification timestamps */ + private final SortedMap> fileTree = new TreeMap<>(); + private @Nullable Thread watcherThread; + + /** + * Class constructor + * @param basePath Base path + */ + public FileSystemWatcher(@NotNull Path basePath) { + this.basePath = basePath; + } + + /** + * Start watcher + * @throws RuntimeException if failed to start + */ + protected void start() throws RuntimeException { + // Prevent initializing more than once + if (watcherThread != null) { + throw new RuntimeException("File system watcher is already running"); + } + + // Perform initial scan + scan(); + + // Start watching files + watcherThread = new WatcherThread(); + watcherThread.start(); + } + + /** + * Stop watcher + */ + protected void stop() { + if (watcherThread != null) { + watcherThread.interrupt(); + watcherThread = null; + } + } + + /** + * On file created + * @param path File path + */ + protected abstract void onFileCreated(@NotNull Path path); + + /** + * On file modified + * @param path File path + */ + protected abstract void onFileModified(@NotNull Path path); + + /** + * On file deleted + * @param path File path + */ + protected abstract void onFileDeleted(@NotNull Path path); + + /** + * Scan base directory recursively + */ + private void scan() { + synchronized (fileTree) { + // Assume all directories and files have been deleted, will discard existing items afterward + Set deletedDirectories = new HashSet<>(fileTree.keySet()); + Set deletedFiles = fileTree.values().stream() + .map(Map::keySet) + .flatMap(Set::stream) + .collect(Collectors.toSet()); + + // Traverse file tree + Set options = EnumSet.noneOf(FileVisitOption.class); + try { + Files.walkFileTree(basePath, options, MAX_DEPTH, new SimpleFileVisitor() { + @Override + public FileVisitResult preVisitDirectory(Path path, BasicFileAttributes attrs) { + fileTree.putIfAbsent(path, new HashMap<>()); + deletedDirectories.remove(path); + return FileVisitResult.CONTINUE; + } + + @Override + public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) { + Map subtree = fileTree.get(path.getParent()); + Long oldModifiedAt = subtree.get(path); + long newModifiedAt = attrs.lastModifiedTime().toMillis(); + if (oldModifiedAt == null) { + subtree.put(path, newModifiedAt); + onFileCreated(path); + } else if (newModifiedAt > oldModifiedAt) { + subtree.put(path, newModifiedAt); + onFileModified(path); + } + deletedFiles.remove(path); + return FileVisitResult.CONTINUE; + } + }); + } catch (IOException e) { + LOGGER.severe("Failed to list files in directory", e); + } + + // Process deleted files and directories + for (Path path : deletedFiles) { + fileTree.get(path.getParent()).remove(path); + onFileDeleted(path); + } + for (Path path : deletedDirectories) { + fileTree.remove(path); + } + } + } + + private class WatcherThread extends Thread { + private final boolean IS_WINDOWS = System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("win"); + + @Override + public void run() { + if (isInotifySupported()) { + runWithFileSystemEvents(); + } else { + LOGGER.warning("Device does not support inotify, detection of file changes will be slower"); + runWithPolling(); + } + } + + /** + * Is inotify supported + * @return Whether inotify is supported + */ + @SuppressWarnings("ResultOfMethodCallIgnored") + private boolean isInotifySupported() { + try (WatchService watchService = FileSystems.getDefault().newWatchService()) { + // Start listening for events + basePath.register( + watchService, + StandardWatchEventKinds.ENTRY_CREATE, + StandardWatchEventKinds.ENTRY_DELETE, + StandardWatchEventKinds.ENTRY_MODIFY + ); + + // Create and delete probe directory + File testFile = basePath.resolve(PROBE_FILENAME).toFile(); + testFile.mkdir(); + testFile.delete(); + + // Check that at least one event was emitted + WatchKey watchKey = watchService.poll(); + return (watchKey != null && !watchKey.pollEvents().isEmpty()); + } catch (IOException __) { + return false; + } + } + + /** + * Run with polling + */ + @SuppressWarnings({"InfiniteLoopStatement", "BusyWait"}) + private void runWithPolling() { + try { + while (true) { + Thread.sleep(POLLING_INTERVAL); + scan(); + } + } catch (InterruptedException __) { + // Silently ignore exception, this is expected when service shuts down + } + } + + /** + * Run with file system events + */ + private void runWithFileSystemEvents() { + try (WatchService watchService = FileSystems.getDefault().newWatchService()) { + // Register initial directories + synchronized (fileTree) { + for (Path path : fileTree.keySet()) { + registerDirectory(watchService, path); + } + } + + // Listen for events + WatchKey key; + try { + while ((key = watchService.take()) != null) { + for (WatchEvent event : key.pollEvents()) { + WatchEvent.Kind kind = event.kind(); + Path keyPath = (Path) key.watchable(); + Path path = keyPath.resolve((Path) event.context()); + handleWatchEvent(watchService, path, kind); + } + key.reset(); + } + } catch (ClosedWatchServiceException | InterruptedException __) { + // Silently ignore exception, this is expected when service shuts down + } + } catch (IOException e) { + LOGGER.severe("Unexpected error at watch service", e); + } + } + + /** + * Handle watch event + * @param watchService Watch service + * @param path File or directory path + * @param kind Event kind + */ + private void handleWatchEvent(@NotNull WatchService watchService, @NotNull Path path, @NotNull WatchEvent.Kind kind) { + synchronized (fileTree) { + Map subtree = fileTree.computeIfAbsent(path.getParent(), k -> new HashMap<>()); + + // Handle deletion of files and directories + if (kind == StandardWatchEventKinds.ENTRY_DELETE) { + if (subtree.containsKey(path)) { + subtree.remove(path); + onFileDeleted(path); + } else { + unregisterDirectory(path); + } + return; + } + + // Handle creation of directories + if (path.toFile().isDirectory()) { + if (kind == StandardWatchEventKinds.ENTRY_CREATE) { + registerDirectory(watchService, path); + } + return; + } + + // Handle creation and modification of files + // NOTE: in Windows, some file creation events are reported as modifications + Long oldModifiedAt = subtree.get(path); + long newModifiedAt = path.toFile().lastModified(); + if (oldModifiedAt == null) { + subtree.put(path, newModifiedAt); + onFileCreated(path); + } else if (newModifiedAt > oldModifiedAt) { + subtree.put(path, newModifiedAt); + onFileModified(path); + } + } + } + + /** + * Register directory + * @param watchService Watch service + * @param path Directory path + */ + private void registerDirectory(@NotNull WatchService watchService, @NotNull Path path) { + // Windows supports listing to events in the entire file tree, + // in that case only allow registering the listener on the base path + if (IS_WINDOWS && !path.equals(basePath)) { + return; + } + + // Start watching directory for events + try { + WatchEvent.Kind[] events = new WatchEvent.Kind[]{ + StandardWatchEventKinds.ENTRY_CREATE, + StandardWatchEventKinds.ENTRY_DELETE, + StandardWatchEventKinds.ENTRY_MODIFY + }; + WatchEvent.Modifier[] modifiers = IS_WINDOWS ? + new WatchEvent.Modifier[]{ExtendedWatchEventModifier.FILE_TREE} : + new WatchEvent.Modifier[0]; + path.register(watchService, events, modifiers); + LOGGER.fine("Started watching directory at \"" + path + "\""); + } catch (IOException e) { + LOGGER.severe("Failed to register directory", e); + } + } + + /** + * Unregister directory + * @param path Directory path + */ + private void unregisterDirectory(@NotNull Path path) { + synchronized (fileTree) { + if (!fileTree.containsKey(path)) { + // Already unregistered, can skip work + return; + } + boolean foundFirst = false; + Iterator>> iter = fileTree.entrySet().iterator(); + while (iter.hasNext()) { + Map.Entry> entry = iter.next(); + if (entry.getKey().startsWith(path)) { + for (Path childPath : entry.getValue().keySet()) { + onFileDeleted(childPath); + } + foundFirst = true; + iter.remove(); + } else if (foundFirst) { + // We can break early because set is alphabetically sorted by key + break; + } + } + } + } + } +} diff --git a/src/main/java/io/josemmo/bukkit/plugin/storage/ImageStorage.java b/src/main/java/io/josemmo/bukkit/plugin/storage/ImageStorage.java index e6085d4..13cc947 100644 --- a/src/main/java/io/josemmo/bukkit/plugin/storage/ImageStorage.java +++ b/src/main/java/io/josemmo/bukkit/plugin/storage/ImageStorage.java @@ -1,14 +1,11 @@ package io.josemmo.bukkit.plugin.storage; -import com.sun.nio.file.ExtendedWatchEventModifier; import io.josemmo.bukkit.plugin.utils.Logger; import io.josemmo.bukkit.plugin.utils.Permissions; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.io.File; -import java.io.IOException; import java.nio.file.*; import java.util.*; import java.util.regex.Matcher; @@ -16,23 +13,18 @@ import java.util.regex.PatternSyntaxException; /** - * A service whose purpose is to keep track of all available image files in a given directory. - * It supports recursive storage (e.g., nested directories) and watches for file system changes in realtime. + * Service for keeping track of image images. *

* All files are indexed based on their filename. - * Due to recursion, filenames can contain forward slashes (i.e., "/") and act as relative paths to the base + * Due to recursion, filenames can contain forward slashes (i.e., "/") and act as relative paths to the base * directory. */ -public class ImageStorage { - private static final boolean IS_WINDOWS = System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("win"); +public class ImageStorage extends FileSystemWatcher { private static final Logger LOGGER = Logger.getLogger("ImageStorage"); /** Map of registered files indexed by filename */ private final SortedMap files = new TreeMap<>(); - private final Path basePath; private final Path cachePath; private final String allowedPaths; - private @Nullable WatchService watchService; - private @Nullable Thread watchServiceThread; /** * Class constructor @@ -41,7 +33,7 @@ public class ImageStorage { * @param allowedPaths Allowed paths pattern */ public ImageStorage(@NotNull Path basePath, @NotNull Path cachePath, @NotNull String allowedPaths) { - this.basePath = basePath; + super(basePath); this.cachePath = cachePath; this.allowedPaths = allowedPaths; } @@ -64,15 +56,10 @@ public ImageStorage(@NotNull Path basePath, @NotNull Path cachePath, @NotNull St /** * Start service - * @throws IOException if failed to start watch service - * @throws RuntimeException if already running + * @throws RuntimeException if failed to start watch service */ - public void start() throws IOException, RuntimeException { - // Prevent initializing more than once - if (watchService != null || watchServiceThread != null) { - throw new RuntimeException("Service is already running"); - } - + @Override + public void start() throws RuntimeException { // Create base directories if necessary if (basePath.toFile().mkdirs()) { LOGGER.info("Created images directory as it did not exist"); @@ -81,33 +68,17 @@ public void start() throws IOException, RuntimeException { LOGGER.info("Created cache directory as it did not exist"); } - // Start watching files - watchService = FileSystems.getDefault().newWatchService(); - watchServiceThread = new WatcherThread(); - watchServiceThread.start(); - registerDirectory(basePath, true); + // Start file system watcher + super.start(); LOGGER.fine("Found " + files.size() + " file(s) in images directory"); } /** * Stop service */ + @Override public void stop() { - // Interrupt watch service thread - if (watchServiceThread != null) { - watchServiceThread.interrupt(); - watchServiceThread = null; - } - - // Close watch service - if (watchService != null) { - try { - watchService.close(); - } catch (IOException e) { - LOGGER.warning("Failed to close watch service", e); - } - watchService = null; - } + super.stop(); } /** @@ -140,7 +111,7 @@ public synchronized int size() { * @return Whether sender is allowed to access path */ public boolean isPathAllowed(@NotNull Path path, @NotNull CommandSender sender) { - return isPathAllowed(getFilename(path), sender); + return isPathAllowed(pathToFilename(path), sender); } /** @@ -191,58 +162,20 @@ public boolean isPathAllowed(@NotNull String path, @NotNull CommandSender sender } /** - * Register directory - * @param path Path to directory - * @param isBase Whether is base directory or not + * Convert path to filename + * @param path File path + * @return Relative path used for indexing */ - private synchronized void registerDirectory(@NotNull Path path, boolean isBase) { - // Validate path - if (!Files.isDirectory(path, LinkOption.NOFOLLOW_LINKS)) { - LOGGER.warning("Cannot list files in \"" + path + "\" as it is not a valid directory"); - return; - } - - // Do initial directory listing - for (File child : Objects.requireNonNull(path.toFile().listFiles())) { - if (child.isDirectory()) { - registerDirectory(child.toPath(), false); - } else { - registerFile(child.toPath()); - } - } - - // Start watching for files changes - if (!IS_WINDOWS || isBase) { - try { - WatchEvent.Kind[] events = new WatchEvent.Kind[]{ - StandardWatchEventKinds.ENTRY_CREATE, - StandardWatchEventKinds.ENTRY_DELETE, - StandardWatchEventKinds.ENTRY_MODIFY - }; - WatchEvent.Modifier[] modifiers = IS_WINDOWS ? - new WatchEvent.Modifier[]{ExtendedWatchEventModifier.FILE_TREE} : - new WatchEvent.Modifier[0]; - path.register(Objects.requireNonNull(watchService), events, modifiers); - LOGGER.fine("Started watching directory at \"" + path + "\""); - } catch (IOException | NullPointerException e) { - LOGGER.severe("Failed to register directory", e); - } - } + private @NotNull String pathToFilename(@NotNull Path path) { + return basePath.relativize(path).toString().replaceAll("\\\\", "/"); } /** - * Register file - * @param path Path to file + * On file created + * @param path File path */ - private synchronized void registerFile(@NotNull Path path) { - // Validate path - if (!Files.isRegularFile(path, LinkOption.NOFOLLOW_LINKS)) { - LOGGER.warning("Cannot register \"" + path + "\" as it is not a valid file"); - return; - } - - // Add file to map - String filename = getFilename(path); + protected synchronized void onFileCreated(@NotNull Path path) { + String filename = pathToFilename(path); ImageFile imageFile = new ImageFile(filename, path); if (files.putIfAbsent(filename, imageFile) == null) { LOGGER.fine("Registered file \"" + filename + "\""); @@ -250,113 +183,28 @@ private synchronized void registerFile(@NotNull Path path) { } /** - * Unregister directory - * @param filename Filename to directory + * On file modified + * @param path File path */ - private synchronized void unregisterDirectory(@NotNull String filename) { - boolean foundFirst = false; - Iterator> iter = files.entrySet().iterator(); - while (iter.hasNext()) { - String entryKey = iter.next().getKey(); - if (entryKey.startsWith(filename+"/")) { - foundFirst = true; - iter.remove(); - LOGGER.fine("Unregistered file \"" + entryKey + "\""); - } else if (foundFirst) { - // We can break early because set is alphabetically sorted by key - break; - } - } - } - - /** - * Unregister file - * @param filename Filename to file - */ - private synchronized void unregisterFile(@NotNull String filename) { - ImageFile imageFile = files.remove(filename); + protected synchronized void onFileModified(@NotNull Path path) { + String filename = pathToFilename(path); + ImageFile imageFile = files.get(filename); if (imageFile != null) { imageFile.invalidate(); - LOGGER.fine("Unregistered file \"" + filename + "\""); + LOGGER.fine("Invalidated file \"" + filename + "\""); } } /** - * Invalidate file - * @param filename Filename to file + * On file deleted + * @param path File path */ - private synchronized void invalidateFile(@NotNull String filename) { - ImageFile imageFile = files.get(filename); + protected synchronized void onFileDeleted(@NotNull Path path) { + String filename = pathToFilename(path); + ImageFile imageFile = files.remove(filename); if (imageFile != null) { imageFile.invalidate(); - } - } - - /** - * Handle watch event - * @param path Path to file or directory - * @param kind Event kind - */ - private synchronized void handleWatchEvent(@NotNull Path path, WatchEvent.Kind kind) { - // Check whether file currently exists in file system (for CREATE and UPDATE events) - // or is registered in the file list (for DELETE event) - String filename = getFilename(path); - boolean isFile = path.toFile().isFile() || files.containsKey(filename); - - // Handle creation event - if (kind == StandardWatchEventKinds.ENTRY_CREATE) { - if (isFile) { - registerFile(path); - } else { - registerDirectory(path, false); - } - return; - } - - // Handle deletion event - if (kind == StandardWatchEventKinds.ENTRY_DELETE) { - if (isFile) { - unregisterFile(filename); - } else { - unregisterDirectory(filename); - } - return; - } - - // Handle modification event - if (kind == StandardWatchEventKinds.ENTRY_MODIFY && isFile) { - invalidateFile(filename); - } - } - - /** - * Get filename from path - * @param path Path to file - * @return Relative path used for indexing - */ - private @NotNull String getFilename(@NotNull Path path) { - return basePath.relativize(path).toString().replaceAll("\\\\", "/"); - } - - private class WatcherThread extends Thread { - @Override - public void run() { - try { - WatchKey key; - while ((key = Objects.requireNonNull(watchService).take()) != null) { - for (WatchEvent event : key.pollEvents()) { - WatchEvent.Kind kind = event.kind(); - Path keyPath = (Path) key.watchable(); - Path path = keyPath.resolve((Path) event.context()); - handleWatchEvent(path, kind); - } - key.reset(); - } - } catch (ClosedWatchServiceException | InterruptedException __) { - // Silently ignore exception, this is expected when service shuts down - } catch (NullPointerException e) { - LOGGER.severe("Watch service was stopped before watcher thread", e); - } + LOGGER.fine("Unregistered file \"" + filename + "\""); } } } diff --git a/src/main/java/io/josemmo/bukkit/plugin/utils/Internals.java b/src/main/java/io/josemmo/bukkit/plugin/utils/Internals.java index 7461a33..bb13820 100644 --- a/src/main/java/io/josemmo/bukkit/plugin/utils/Internals.java +++ b/src/main/java/io/josemmo/bukkit/plugin/utils/Internals.java @@ -1,19 +1,22 @@ package io.josemmo.bukkit.plugin.utils; -import com.mojang.brigadier.CommandDispatcher; +import java.lang.reflect.Field; +import java.lang.reflect.Method; import org.bukkit.Bukkit; import org.bukkit.Server; import org.bukkit.command.CommandMap; import org.bukkit.command.CommandSender; import org.jetbrains.annotations.NotNull; -import java.lang.reflect.Field; -import java.lang.reflect.Method; +import org.jetbrains.annotations.Nullable; +import com.comphenix.protocol.reflect.FuzzyReflection; +import com.comphenix.protocol.utility.MinecraftReflection; +import com.mojang.brigadier.CommandDispatcher; public class Internals { public static final float MINECRAFT_VERSION; private static final CommandDispatcher DISPATCHER; private static final CommandMap COMMAND_MAP; - private static final Method GET_BUKKIT_SENDER_METHOD; + private static @Nullable Method GET_BUKKIT_SENDER_METHOD = null; static { try { @@ -27,27 +30,27 @@ public class Internals { Class obcClass = obcInstance.getClass(); // Get "net.minecraft.server.MinecraftServer" references - Object nmsInstance = obcClass.getDeclaredMethod("getServer").invoke(obcInstance); - Class nmsClass = nmsInstance.getClass().getSuperclass(); + Object nmsServerInstance = obcClass.getDeclaredMethod("getServer").invoke(obcInstance); // Get "net.minecraft.server.CommandDispatcher" references - Object nmsDispatcherInstance = nmsClass.getDeclaredField("vanillaCommandDispatcher").get(nmsInstance); - Class nmsDispatcherClass = nmsDispatcherInstance.getClass(); + Class nmsDispatcherClass = MinecraftReflection.getMinecraftClass( + "CommandDispatcher", // Spigot <1.17 + "commands.CommandDispatcher", // Spigot >=1.17 + "commands.Commands" // PaperMC + ); + Object nmsDispatcherInstance = FuzzyReflection.fromObject(nmsServerInstance, true) + .getMethodByReturnTypeAndParameters("getDispatcher", nmsDispatcherClass) + .invoke(nmsServerInstance); - // Get Brigadier dispatcher instance - Method getDispatcherMethod = nmsDispatcherClass.getDeclaredMethod("a"); - getDispatcherMethod.setAccessible(true); - DISPATCHER = (CommandDispatcher) getDispatcherMethod.invoke(nmsDispatcherInstance); + // Get "com.mojang.brigadier.CommandDispatcher" instance + DISPATCHER = (CommandDispatcher) FuzzyReflection.fromObject(nmsDispatcherInstance, true) + .getMethodByReturnTypeAndParameters("getDispatcher", CommandDispatcher.class) + .invoke(nmsDispatcherInstance); // Get command map instance Field commandMapField = obcClass.getDeclaredField("commandMap"); commandMapField.setAccessible(true); COMMAND_MAP = (CommandMap) commandMapField.get(obcInstance); - - // Get CommandListenerWrapper.getBukkitSender() method - Class clwClass = Class.forName(nmsDispatcherClass.getPackage().getName() + ".CommandListenerWrapper"); - GET_BUKKIT_SENDER_METHOD = clwClass.getDeclaredMethod("getBukkitSender"); - GET_BUKKIT_SENDER_METHOD.setAccessible(true); } catch (Exception e) { throw new RuntimeException("Failed to get internal classes due to incompatible Minecraft server", e); } @@ -76,9 +79,12 @@ public class Internals { */ public static @NotNull CommandSender getBukkitSender(@NotNull Object source) { try { + if (GET_BUKKIT_SENDER_METHOD == null) { + GET_BUKKIT_SENDER_METHOD = source.getClass().getDeclaredMethod("getBukkitSender"); + } return (CommandSender) GET_BUKKIT_SENDER_METHOD.invoke(source); } catch (Exception e) { - throw new RuntimeException("Failed to extract bukkit sender from source", e); + throw new RuntimeException("Failed to extract Bukkit sender from source", e); } } } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 70faeba..15968e6 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -4,12 +4,14 @@ main: io.josemmo.bukkit.plugin.YamipaPlugin api-version: 1.16 depend: [ProtocolLib] softdepend: + - BentoBox - GriefPrevention - GroupManager - Hyperverse - LuckPerms - Multiverse-Core - My_Worlds + - PhantomWorlds - Towny - WorldGuard