mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-13 12:55:06 +00:00
Compare commits
115 Commits
Author | SHA1 | Date | |
---|---|---|---|
7bbb2617c8 | |||
2ec65ba799 | |||
3dd7c09351 | |||
afc6e8878d | |||
7eaf1246a0 | |||
645c44ae9c | |||
331b05c681 | |||
3abe80184a | |||
7618b13c6e | |||
351cd4bfd7 | |||
1154c7c1ab | |||
4a3e42f82e | |||
8ecf9717d6 | |||
3ca80b353b | |||
7d172e2211 | |||
e934e2bd26 | |||
3177d19730 | |||
82104a8251 | |||
e9a17374d1 | |||
c82dfef9b0 | |||
688be0a404 | |||
33e6b63fe5 | |||
5d92eddc82 | |||
0324392cd8 | |||
01b0742bd4 | |||
fcb2ccab99 | |||
a45a96b3ee | |||
26df37e6ef | |||
554f96bc24 | |||
0ea3861d43 | |||
a323a5e56d | |||
79caba22a7 | |||
30815bc8a2 | |||
161ab5af16 | |||
ab41594da2 | |||
80d4c11061 | |||
e767796986 | |||
dea7031b86 | |||
7e3d099d5b | |||
5abc7f866a | |||
9dc2a01c2e | |||
6f0aa360d1 | |||
7c3b78b0a0 | |||
2adaca2521 | |||
b6f39035f8 | |||
cfd550451f | |||
77530b0c24 | |||
a913736235 | |||
124edeacaf | |||
a216f4d089 | |||
17b0e0be84 | |||
81d8aed2e2 | |||
69418084bc | |||
593a4b65ea | |||
869d340f10 | |||
5d64d4a1e3 | |||
cc3c5bdb8d | |||
e1c4150dff | |||
755ca1af9b | |||
7d78b9cb2c | |||
91f802ac7a | |||
a6299b0927 | |||
6e372d9e36 | |||
ad8132ae11 | |||
cf15a0913d | |||
33cf085692 | |||
223893fd5c | |||
a58551af5b | |||
f7dce4af88 | |||
dff5c30172 | |||
e8994dbc17 | |||
aaba8a2a9a | |||
27056b6c37 | |||
9930de01b9 | |||
cd021f49cd | |||
e4ce467c0b | |||
6b4687a36b | |||
c085bf0db4 | |||
e0d4bd985e | |||
3339225fe8 | |||
df33e179e5 | |||
624a7dff16 | |||
1d314ad4ce | |||
5a98b08ee8 | |||
d9d02d526a | |||
f272986903 | |||
988da8eaab | |||
ea7f706aed | |||
52e3f1e269 | |||
4c9d2a989e | |||
022db5cbe3 | |||
3bbf558883 | |||
1d68d9f71a | |||
f2e8824242 | |||
a0e47b5a64 | |||
f7465f55e7 | |||
741182c55f | |||
2efce35331 | |||
d1dfbd95e2 | |||
1aee5b1ed8 | |||
fefd3e6b29 | |||
9b43be9d9c | |||
ea677154cb | |||
7f2802e75f | |||
f924208881 | |||
6bea2961d9 | |||
ac3a6033b9 | |||
d7e6b01216 | |||
26aee7ff73 | |||
319c8fe32c | |||
ce121ccea9 | |||
7f1a4185b5 | |||
8cc7fb9dd9 | |||
194cb1fb84 | |||
8ea106c091 |
5
.github/dependabot.yml
vendored
5
.github/dependabot.yml
vendored
@ -11,3 +11,8 @@ updates:
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
|
BIN
.github/readme/pocketmine-dark.png
vendored
Normal file
BIN
.github/readme/pocketmine-dark.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
.github/readme/pocketmine.png
vendored
Normal file
BIN
.github/readme/pocketmine.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
14
.github/workflows/build-docker-image.yml
vendored
14
.github/workflows/build-docker-image.yml
vendored
@ -12,16 +12,16 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Clone pmmp/PocketMine-Docker repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: pmmp/PocketMine-Docker
|
||||
fetch-depth: 1
|
||||
@ -46,7 +46,7 @@ jobs:
|
||||
run: echo ::set-output name=NAME::$(echo "${GITHUB_REPOSITORY,,}")
|
||||
|
||||
- name: Build image for tag
|
||||
uses: docker/build-push-action@v2.10.0
|
||||
uses: docker/build-push-action@v3.0.0
|
||||
with:
|
||||
push: true
|
||||
context: ./pocketmine-mp
|
||||
@ -59,7 +59,7 @@ jobs:
|
||||
|
||||
- name: Build image for major tag
|
||||
if: steps.channel.outputs.CHANNEL == 'stable'
|
||||
uses: docker/build-push-action@v2.10.0
|
||||
uses: docker/build-push-action@v3.0.0
|
||||
with:
|
||||
push: true
|
||||
context: ./pocketmine-mp
|
||||
@ -72,7 +72,7 @@ jobs:
|
||||
|
||||
- name: Build image for minor tag
|
||||
if: steps.channel.outputs.CHANNEL == 'stable'
|
||||
uses: docker/build-push-action@v2.10.0
|
||||
uses: docker/build-push-action@v3.0.0
|
||||
with:
|
||||
push: true
|
||||
context: ./pocketmine-mp
|
||||
@ -85,7 +85,7 @@ jobs:
|
||||
|
||||
- name: Build image for latest tag
|
||||
if: steps.channel.outputs.CHANNEL == 'stable'
|
||||
uses: docker/build-push-action@v2.10.0
|
||||
uses: docker/build-push-action@v3.0.0
|
||||
with:
|
||||
push: true
|
||||
context: ./pocketmine-mp
|
||||
|
10
.github/workflows/draft-release.yml
vendored
10
.github/workflows/draft-release.yml
vendored
@ -13,17 +13,17 @@ jobs:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@2.12.0
|
||||
uses: shivammathur/setup-php@2.18.1
|
||||
with:
|
||||
php-version: 8.0
|
||||
|
||||
- name: Restore Composer package cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cache/composer/files
|
||||
@ -60,7 +60,7 @@ jobs:
|
||||
run: php build/generate-build-info-json.php ${{ github.sha }} ${{ steps.get-pm-version.outputs.PM_VERSION }} ${{ github.repository }} ${{ steps.build-number.outputs.BUILD_NUMBER }} > build_info.json
|
||||
|
||||
- name: Upload release artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: release_artifacts
|
||||
path: |
|
||||
@ -69,7 +69,7 @@ jobs:
|
||||
${{ github.workspace }}/build_info.json
|
||||
|
||||
- name: Create draft release
|
||||
uses: ncipollo/release-action@v1.8.6
|
||||
uses: ncipollo/release-action@v1.10.0
|
||||
with:
|
||||
artifacts: ${{ github.workspace }}/PocketMine-MP.phar,${{ github.workspace }}/start.*,${{ github.workspace }}/build_info.json
|
||||
commit: ${{ github.sha }}
|
||||
|
30
.github/workflows/main.yml
vendored
30
.github/workflows/main.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
image: [ubuntu-20.04]
|
||||
php: [8.0.16]
|
||||
php: [8.0.18]
|
||||
|
||||
steps:
|
||||
- name: Build and prepare PHP cache
|
||||
@ -31,10 +31,10 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: [ubuntu-20.04]
|
||||
php: [8.0.16]
|
||||
php: [8.0.18]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup PHP
|
||||
uses: pmmp/setup-php-action@aa636a4fe0c1c035fd9a3f05e360eadd86e06440
|
||||
@ -46,7 +46,7 @@ jobs:
|
||||
run: curl -sS https://getcomposer.org/installer | php
|
||||
|
||||
- name: Restore Composer package cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cache/composer/files
|
||||
@ -69,10 +69,10 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: [ubuntu-20.04]
|
||||
php: [8.0.16]
|
||||
php: [8.0.18]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup PHP
|
||||
uses: pmmp/setup-php-action@aa636a4fe0c1c035fd9a3f05e360eadd86e06440
|
||||
@ -84,7 +84,7 @@ jobs:
|
||||
run: curl -sS https://getcomposer.org/installer | php
|
||||
|
||||
- name: Restore Composer package cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cache/composer/files
|
||||
@ -107,10 +107,10 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: [ubuntu-20.04]
|
||||
php: [8.0.16]
|
||||
php: [8.0.18]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
@ -124,7 +124,7 @@ jobs:
|
||||
run: curl -sS https://getcomposer.org/installer | php
|
||||
|
||||
- name: Restore Composer package cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cache/composer/files
|
||||
@ -147,10 +147,10 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: [ubuntu-20.04]
|
||||
php: [8.0.16]
|
||||
php: [8.0.18]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup PHP
|
||||
uses: pmmp/setup-php-action@aa636a4fe0c1c035fd9a3f05e360eadd86e06440
|
||||
@ -162,7 +162,7 @@ jobs:
|
||||
run: curl -sS https://getcomposer.org/installer | php
|
||||
|
||||
- name: Restore Composer package cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cache/composer/files
|
||||
@ -192,10 +192,10 @@ jobs:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup PHP and tools
|
||||
uses: shivammathur/setup-php@2.15.0
|
||||
uses: shivammathur/setup-php@2.18.1
|
||||
with:
|
||||
php-version: 8.0
|
||||
tools: php-cs-fixer:3.2
|
||||
|
2
.github/workflows/update-updater-api.yml
vendored
2
.github/workflows/update-updater-api.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
||||
- name: Install jq
|
||||
run: sudo apt update && sudo apt install jq -y
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: pmmp/update.pmmp.io
|
||||
ssh-key: ${{ secrets.UPDATE_PMMP_IO_DEPLOY_KEY }}
|
||||
|
10
README.md
10
README.md
@ -1,5 +1,13 @@
|
||||
<p align="center">
|
||||
<a href="https://pmmp.io"><img src="http://cdn.pocketmine.net/img/PocketMine-MP-h.png"></img></a><br>
|
||||
<a href="https://pmmp.io">
|
||||
<!--[if IE]>
|
||||
<img src="https://github.com/pmmp/PocketMine-MP/blob/stable/.github/readme/pocketmine.png" alt="The PocketMine-MP logo" title="PocketMine" loading="eager" />
|
||||
<![endif]-->
|
||||
<picture>
|
||||
<source srcset="https://github.com/pmmp/PocketMine-MP/raw/stable/.github/readme/pocketmine-dark.png" media="(prefers-color-scheme: dark)">
|
||||
<img src="https://github.com/pmmp/PocketMine-MP/raw/stable/.github/readme/pocketmine.png" loading="eager" />
|
||||
</picture>
|
||||
</a><br>
|
||||
<b>A highly customisable, open source server software for Minecraft: Bedrock Edition written in PHP</b>
|
||||
</p>
|
||||
|
||||
|
Submodule build/php updated: 1fae6b8d4a...8138c6a4a4
@ -79,3 +79,43 @@ Released 28th March 2022.
|
||||
|
||||
### Gameplay
|
||||
- Reduced the appearance of ghost items in unsupported gameplay scenarios using client prediction information. This fixes, for example, the appearance of ghost items when right-clicking on a filled flower pot.
|
||||
|
||||
# 4.2.6
|
||||
Released 1st April 2022.
|
||||
|
||||
## Fixes
|
||||
- Fixed buffer length underflow crash in `LoginPacket` handling.
|
||||
|
||||
# 4.2.7
|
||||
Released 15th April 2022.
|
||||
|
||||
## General
|
||||
- Added lots more documentation (in comments) about the `aliases` section in `pocketmine.yml`. You can read about this feature in the `aliases` section of the [updated `pocketmine.yml` template](/resources/pocketmine.yml).
|
||||
- Improved wording of documentation of `PlayerPreLoginEvent`.
|
||||
|
||||
## Fixes
|
||||
- Fixed core server crash when a plugin causes another plugin to be disabled during a scheduled task.
|
||||
- Fixed core server crash when loading a plugin with an abstract main class.
|
||||
- Fixed ghost items in many interaction situations (most notably, using projectiles while looking at an entity or block).
|
||||
- Implemented a workaround for a client teleport bug which led to player positions not updating properly when using ender pearls.
|
||||
- Fixed buggy movement when teleporting the player during `PlayerToggleSneakEvent`, `PlayerToggleSprintEvent`, `PlayerToggleSwimEvent` and `PlayerToggleGlideEvent`.
|
||||
|
||||
# 4.2.8
|
||||
Released 17th April 2022.
|
||||
|
||||
## Fixes
|
||||
- Fixed a memory leak in RakLib which could result in a server crash when players stay online for a long time.
|
||||
- Fixed server crash when attempting to load a corrupted empty resource pack.
|
||||
- Fixed users with the same name with differerently cased letters being able to duplicate items (userdata is matched by case-insensitive name).
|
||||
|
||||
# 4.2.9
|
||||
Released 19th April 2022.
|
||||
|
||||
## Fixes
|
||||
- Fixed several potential crashes when deserializing item NBT (due to insufficient validation of input data).
|
||||
|
||||
# 4.2.10
|
||||
Released 20th April 2022.
|
||||
|
||||
## Fixes
|
||||
- Fixed performance issue when chat messages received from the client contain many newlines. This security vulnerability was disclosed publicly necessitating a priority fix.
|
||||
|
77
changelogs/4.3.md
Normal file
77
changelogs/4.3.md
Normal file
@ -0,0 +1,77 @@
|
||||
**For Minecraft: Bedrock Edition 1.18.30**
|
||||
|
||||
### Note about API versions
|
||||
Plugins which don't touch the protocol and compatible with any previous 4.x.y version will also run on these releases and do not need API bumps.
|
||||
Plugin developers should **only** update their required API to this version if you need the changes in this build.
|
||||
|
||||
**WARNING: If your plugin uses the protocol, you're not shielded by API change constraints.** You should consider using the `mcpe-protocol` directive in `plugin.yml` as a constraint if you do.
|
||||
|
||||
# 4.3.0
|
||||
Released 20th April 2022.
|
||||
|
||||
## General
|
||||
- Added support for Minecraft: Bedrock Edition 1.18.30.
|
||||
- Removed support for older versions.
|
||||
|
||||
# 4.3.1
|
||||
Released 23rd April 2022.
|
||||
|
||||
## Fixes
|
||||
- Updated BedrockProtocol dependency to fix incorrect command argument types.
|
||||
- Creative players no longer die in the void.
|
||||
|
||||
# 4.3.2
|
||||
Released 10th May 2022.
|
||||
|
||||
## Fixes
|
||||
- Fixed an assertion failure in certain edge cases during world generation.
|
||||
- Fixed `Entity::setNameTagVisible()` not immediately showing results to players already online.
|
||||
|
||||
## Documentation
|
||||
- Added more documentation in the template `pocketmine.yml` for the `aliases` config section.
|
||||
- Removed useless doc comment in `PlayerChangeSkinEvent`.
|
||||
|
||||
# 4.3.3
|
||||
Released 16th May 2022.
|
||||
|
||||
## General
|
||||
- Improved display of parameters in exception stack trace logs.
|
||||
- Exception stack traces now include names for dynamic named arguments (i.e. arguments that don't match any parameter of the function), if any were given.
|
||||
- Note: Named arguments which do match parameters are not shown this way, since PHP reduces them to positional arguments for performance reasons.
|
||||
|
||||
## Fixes
|
||||
- Fixed server crash when chunks are unloaded during chunk generation callbacks
|
||||
- Fixed dead coral fan items placing coral fans in the wrong orientation.
|
||||
- Fixed max stack size of boat items.
|
||||
|
||||
# 4.3.4
|
||||
Released 22nd May 2022.
|
||||
|
||||
## Fixes
|
||||
- Fixed `difficulty` in `server.properties` having no effect - it's now applied to newly generated worlds.
|
||||
- Note: this setting still doesn't behave the same way as vanilla due to potential disruption to existing servers.
|
||||
- Fixed paintings not working in newly generated worlds and some other cases.
|
||||
- Fixed inventory window switching breaking the inventory UI in some cases (e.g. pressing E while clicking a chest).
|
||||
- Fixed minecart items incorrectly stacking.
|
||||
- Fixed incorrect light levels in translucent blocks at the top of the world.
|
||||
- Fixed teleporting sleeping players causing broken behaviour on the sleeping player's client.
|
||||
- Fixed `EntityExplodeEvent->setYield()` accepting values outside the range 0-100.
|
||||
- Fixed `ExplosionPrimeEvent->setForce()` accepting negative values (later resulting in crashes).
|
||||
|
||||
## Documentation
|
||||
- Updated documentation for the following events:
|
||||
- `CommandEvent`
|
||||
- `EntityDespawnEvent`
|
||||
- `EntityExplodeEvent`
|
||||
- `EntitySpawnEvent`
|
||||
- `ExplosionPrimeEvent`
|
||||
- `InventoryTransactionEvent`
|
||||
- `ItemDespawnEvent`
|
||||
- `ItemSpawnEvent`
|
||||
- `PlayerCommandPreprocessEvent`
|
||||
- `PlayerDropItemEvent`
|
||||
- `PlayerItemHeldEvent`
|
||||
- `PlayerKickEvent`
|
||||
- `PlayerQuitEvent`
|
||||
- `PlayerTransferEvent`
|
||||
- `UpdateNotifyEvent`
|
@ -34,14 +34,14 @@
|
||||
"adhocore/json-comment": "^1.1",
|
||||
"fgrosse/phpasn1": "^2.3",
|
||||
"netresearch/jsonmapper": "^4.0",
|
||||
"pocketmine/bedrock-data": "~1.6.0+bedrock-1.18.10",
|
||||
"pocketmine/bedrock-protocol": "~8.0.0+bedrock-1.18.10",
|
||||
"pocketmine/bedrock-data": "~1.7.0+bedrock-1.18.30",
|
||||
"pocketmine/bedrock-protocol": "~9.0.0+bedrock-1.18.30",
|
||||
"pocketmine/binaryutils": "^0.2.1",
|
||||
"pocketmine/callback-validator": "^1.0.2",
|
||||
"pocketmine/classloader": "^0.2.0",
|
||||
"pocketmine/color": "^0.2.0",
|
||||
"pocketmine/errorhandler": "^0.6.0",
|
||||
"pocketmine/locale-data": "~2.4.2",
|
||||
"pocketmine/locale-data": "~2.5.0",
|
||||
"pocketmine/log": "^0.4.0",
|
||||
"pocketmine/log-pthreads": "^0.4.0",
|
||||
"pocketmine/math": "^0.4.0",
|
||||
@ -53,9 +53,9 @@
|
||||
"webmozart/path-util": "^2.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "1.4.10",
|
||||
"phpstan/phpstan-phpunit": "^1.0.0",
|
||||
"phpstan/phpstan-strict-rules": "^1.0.0",
|
||||
"phpstan/phpstan": "1.6.8",
|
||||
"phpstan/phpstan-phpunit": "^1.1.0",
|
||||
"phpstan/phpstan-strict-rules": "^1.2.0",
|
||||
"phpunit/phpunit": "^9.2"
|
||||
},
|
||||
"autoload": {
|
||||
|
251
composer.lock
generated
251
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "f3800582ad388d0ec2a95dffc3742d8e",
|
||||
"content-hash": "ee1b984b67a25ec7c84aeacdc948b367",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/json-comment",
|
||||
@ -249,42 +249,42 @@
|
||||
},
|
||||
{
|
||||
"name": "pocketmine/bedrock-data",
|
||||
"version": "1.6.0+bedrock-1.18.10",
|
||||
"version": "1.7.0+bedrock-1.18.30",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pmmp/BedrockData.git",
|
||||
"reference": "e98c511584a7bd58a95986374d2df4b04c6a2ba0"
|
||||
"reference": "c8f323ff0cbdb36a5d95e7e4a23969f562445be0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pmmp/BedrockData/zipball/e98c511584a7bd58a95986374d2df4b04c6a2ba0",
|
||||
"reference": "e98c511584a7bd58a95986374d2df4b04c6a2ba0",
|
||||
"url": "https://api.github.com/repos/pmmp/BedrockData/zipball/c8f323ff0cbdb36a5d95e7e4a23969f562445be0",
|
||||
"reference": "c8f323ff0cbdb36a5d95e7e4a23969f562445be0",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "library",
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0"
|
||||
"CC0-1.0"
|
||||
],
|
||||
"description": "Blobs of data generated from Minecraft: Bedrock Edition, used by PocketMine-MP",
|
||||
"support": {
|
||||
"issues": "https://github.com/pmmp/BedrockData/issues",
|
||||
"source": "https://github.com/pmmp/BedrockData/tree/bedrock-1.18.10"
|
||||
"source": "https://github.com/pmmp/BedrockData/tree/bedrock-1.18.30"
|
||||
},
|
||||
"time": "2022-02-08T19:13:47+00:00"
|
||||
"time": "2022-04-20T12:40:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pocketmine/bedrock-protocol",
|
||||
"version": "8.0.1+bedrock-1.18.10",
|
||||
"version": "9.0.1+bedrock-1.18.30",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pmmp/BedrockProtocol.git",
|
||||
"reference": "a740f6095b35278c0e0dac6db84a5e4d2456b113"
|
||||
"reference": "9d3cc87c4d26c002dd42aa9af20c0cd47a72018e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/a740f6095b35278c0e0dac6db84a5e4d2456b113",
|
||||
"reference": "a740f6095b35278c0e0dac6db84a5e4d2456b113",
|
||||
"url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/9d3cc87c4d26c002dd42aa9af20c0cd47a72018e",
|
||||
"reference": "9d3cc87c4d26c002dd42aa9af20c0cd47a72018e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -298,7 +298,7 @@
|
||||
"ramsey/uuid": "^4.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "1.4.5",
|
||||
"phpstan/phpstan": "1.5.7",
|
||||
"phpstan/phpstan-phpunit": "^1.0.0",
|
||||
"phpstan/phpstan-strict-rules": "^1.0.0",
|
||||
"phpunit/phpunit": "^9.5"
|
||||
@ -316,9 +316,9 @@
|
||||
"description": "An implementation of the Minecraft: Bedrock Edition protocol in PHP",
|
||||
"support": {
|
||||
"issues": "https://github.com/pmmp/BedrockProtocol/issues",
|
||||
"source": "https://github.com/pmmp/BedrockProtocol/tree/8.0.1+bedrock-1.18.10"
|
||||
"source": "https://github.com/pmmp/BedrockProtocol/tree/9.0.1+bedrock-1.18.30"
|
||||
},
|
||||
"time": "2022-02-21T03:31:48+00:00"
|
||||
"time": "2022-04-23T14:48:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pocketmine/binaryutils",
|
||||
@ -536,16 +536,16 @@
|
||||
},
|
||||
{
|
||||
"name": "pocketmine/locale-data",
|
||||
"version": "2.4.3",
|
||||
"version": "2.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pmmp/Language.git",
|
||||
"reference": "4d0b081f1a79407e087968ea76aaf330db6ea2b5"
|
||||
"reference": "df6fc7f2b48850b306c60466a11f7a27bb8fe1de"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pmmp/Language/zipball/4d0b081f1a79407e087968ea76aaf330db6ea2b5",
|
||||
"reference": "4d0b081f1a79407e087968ea76aaf330db6ea2b5",
|
||||
"url": "https://api.github.com/repos/pmmp/Language/zipball/df6fc7f2b48850b306c60466a11f7a27bb8fe1de",
|
||||
"reference": "df6fc7f2b48850b306c60466a11f7a27bb8fe1de",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "library",
|
||||
@ -553,9 +553,9 @@
|
||||
"description": "Language resources used by PocketMine-MP",
|
||||
"support": {
|
||||
"issues": "https://github.com/pmmp/Language/issues",
|
||||
"source": "https://github.com/pmmp/Language/tree/2.4.3"
|
||||
"source": "https://github.com/pmmp/Language/tree/2.5.0"
|
||||
},
|
||||
"time": "2022-01-25T23:18:24+00:00"
|
||||
"time": "2022-04-01T22:36:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pocketmine/log",
|
||||
@ -727,16 +727,16 @@
|
||||
},
|
||||
{
|
||||
"name": "pocketmine/raklib",
|
||||
"version": "0.14.3",
|
||||
"version": "0.14.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pmmp/RakLib.git",
|
||||
"reference": "4798576fec0364266dce23b368a7fec5e5de7927"
|
||||
"reference": "1ea8e3b95a1b6bf785dc27d76578657be4185f42"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pmmp/RakLib/zipball/4798576fec0364266dce23b368a7fec5e5de7927",
|
||||
"reference": "4798576fec0364266dce23b368a7fec5e5de7927",
|
||||
"url": "https://api.github.com/repos/pmmp/RakLib/zipball/1ea8e3b95a1b6bf785dc27d76578657be4185f42",
|
||||
"reference": "1ea8e3b95a1b6bf785dc27d76578657be4185f42",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -748,7 +748,7 @@
|
||||
"pocketmine/log": "^0.3.0 || ^0.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "1.3.3",
|
||||
"phpstan/phpstan": "1.5.4",
|
||||
"phpstan/phpstan-strict-rules": "^1.0"
|
||||
},
|
||||
"type": "library",
|
||||
@ -764,9 +764,9 @@
|
||||
"description": "A RakNet server implementation written in PHP",
|
||||
"support": {
|
||||
"issues": "https://github.com/pmmp/RakLib/issues",
|
||||
"source": "https://github.com/pmmp/RakLib/tree/0.14.3"
|
||||
"source": "https://github.com/pmmp/RakLib/tree/0.14.4"
|
||||
},
|
||||
"time": "2022-01-10T21:29:48+00:00"
|
||||
"time": "2022-04-17T18:42:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pocketmine/raklib-ipc",
|
||||
@ -930,25 +930,24 @@
|
||||
},
|
||||
{
|
||||
"name": "ramsey/uuid",
|
||||
"version": "4.2.3",
|
||||
"version": "4.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ramsey/uuid.git",
|
||||
"reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df"
|
||||
"reference": "8505afd4fea63b81a85d3b7b53ac3cb8dc347c28"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df",
|
||||
"reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df",
|
||||
"url": "https://api.github.com/repos/ramsey/uuid/zipball/8505afd4fea63b81a85d3b7b53ac3cb8dc347c28",
|
||||
"reference": "8505afd4fea63b81a85d3b7b53ac3cb8dc347c28",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"brick/math": "^0.8 || ^0.9",
|
||||
"ext-ctype": "*",
|
||||
"ext-json": "*",
|
||||
"php": "^7.2 || ^8.0",
|
||||
"ramsey/collection": "^1.0",
|
||||
"symfony/polyfill-ctype": "^1.8",
|
||||
"symfony/polyfill-php80": "^1.14"
|
||||
"php": "^8.0",
|
||||
"ramsey/collection": "^1.0"
|
||||
},
|
||||
"replace": {
|
||||
"rhumsaa/uuid": "self.version"
|
||||
@ -985,9 +984,6 @@
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "4.x-dev"
|
||||
},
|
||||
"captainhook": {
|
||||
"force-install": true
|
||||
}
|
||||
@ -1012,7 +1008,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/ramsey/uuid/issues",
|
||||
"source": "https://github.com/ramsey/uuid/tree/4.2.3"
|
||||
"source": "https://github.com/ramsey/uuid/tree/4.3.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1024,7 +1020,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-09-25T23:10:38+00:00"
|
||||
"time": "2022-03-27T21:42:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
@ -1108,89 +1104,6 @@
|
||||
],
|
||||
"time": "2021-10-20T20:35:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php80",
|
||||
"version": "v1.25.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php80.git",
|
||||
"reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c",
|
||||
"reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php80\\": ""
|
||||
},
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ion Bazan",
|
||||
"email": "ion.bazan@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-03-04T08:16:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php81",
|
||||
"version": "v1.25.0",
|
||||
@ -1789,16 +1702,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/type-resolver",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
||||
"reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706"
|
||||
"reference": "77a32518733312af16a44300404e945338981de3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706",
|
||||
"reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3",
|
||||
"reference": "77a32518733312af16a44300404e945338981de3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1833,9 +1746,9 @@
|
||||
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
|
||||
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0"
|
||||
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1"
|
||||
},
|
||||
"time": "2022-01-04T19:58:01+00:00"
|
||||
"time": "2022-03-15T21:29:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
@ -1906,20 +1819,20 @@
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "1.4.10",
|
||||
"version": "1.6.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan.git",
|
||||
"reference": "898c479c39caa727bedf4311dd294a8f4e250e72"
|
||||
"reference": "d76498c5531232cb8386ceb6004f7e013138d3ba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/898c479c39caa727bedf4311dd294a8f4e250e72",
|
||||
"reference": "898c479c39caa727bedf4311dd294a8f4e250e72",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/d76498c5531232cb8386ceb6004f7e013138d3ba",
|
||||
"reference": "d76498c5531232cb8386ceb6004f7e013138d3ba",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1|^8.0"
|
||||
"php": "^7.2|^8.0"
|
||||
},
|
||||
"conflict": {
|
||||
"phpstan/phpstan-shim": "*"
|
||||
@ -1941,7 +1854,7 @@
|
||||
"description": "PHPStan - PHP Static Analysis Tool",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpstan/issues",
|
||||
"source": "https://github.com/phpstan/phpstan/tree/1.4.10"
|
||||
"source": "https://github.com/phpstan/phpstan/tree/1.6.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1961,25 +1874,25 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-03-14T10:25:45+00:00"
|
||||
"time": "2022-05-10T06:54:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan-phpunit",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan-phpunit.git",
|
||||
"reference": "9eb88c9f689003a8a2a5ae9e010338ee94dc39b3"
|
||||
"reference": "4a3c437c09075736285d1cabb5c75bf27ed0bc84"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/9eb88c9f689003a8a2a5ae9e010338ee94dc39b3",
|
||||
"reference": "9eb88c9f689003a8a2a5ae9e010338ee94dc39b3",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/4a3c437c09075736285d1cabb5c75bf27ed0bc84",
|
||||
"reference": "4a3c437c09075736285d1cabb5c75bf27ed0bc84",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1 || ^8.0",
|
||||
"phpstan/phpstan": "^1.0"
|
||||
"php": "^7.2 || ^8.0",
|
||||
"phpstan/phpstan": "^1.5.0"
|
||||
},
|
||||
"conflict": {
|
||||
"phpunit/phpunit": "<7.0"
|
||||
@ -1992,9 +1905,6 @@
|
||||
},
|
||||
"type": "phpstan-extension",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
},
|
||||
"phpstan": {
|
||||
"includes": [
|
||||
"extension.neon",
|
||||
@ -2014,27 +1924,27 @@
|
||||
"description": "PHPUnit extensions and rules for PHPStan",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpstan-phpunit/issues",
|
||||
"source": "https://github.com/phpstan/phpstan-phpunit/tree/1.0.0"
|
||||
"source": "https://github.com/phpstan/phpstan-phpunit/tree/1.1.1"
|
||||
},
|
||||
"time": "2021-10-14T08:03:54+00:00"
|
||||
"time": "2022-04-20T15:24:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan-strict-rules",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan-strict-rules.git",
|
||||
"reference": "e12d55f74a8cca18c6e684c6450767e055ba7717"
|
||||
"reference": "0c82c96f2a55d8b91bbc7ee6512c94f68a206b43"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/e12d55f74a8cca18c6e684c6450767e055ba7717",
|
||||
"reference": "e12d55f74a8cca18c6e684c6450767e055ba7717",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/0c82c96f2a55d8b91bbc7ee6512c94f68a206b43",
|
||||
"reference": "0c82c96f2a55d8b91bbc7ee6512c94f68a206b43",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1 || ^8.0",
|
||||
"phpstan/phpstan": "^1.2.0"
|
||||
"php": "^7.2 || ^8.0",
|
||||
"phpstan/phpstan": "^1.6.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"nikic/php-parser": "^4.13.0",
|
||||
@ -2044,9 +1954,6 @@
|
||||
},
|
||||
"type": "phpstan-extension",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
},
|
||||
"phpstan": {
|
||||
"includes": [
|
||||
"rules.neon"
|
||||
@ -2065,9 +1972,9 @@
|
||||
"description": "Extra strict and opinionated rules for PHPStan",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpstan-strict-rules/issues",
|
||||
"source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.1.0"
|
||||
"source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.2.3"
|
||||
},
|
||||
"time": "2021-11-18T09:30:29+00:00"
|
||||
"time": "2022-05-04T15:20:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
@ -2389,16 +2296,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "9.5.19",
|
||||
"version": "9.5.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "35ea4b7f3acabb26f4bb640f8c30866c401da807"
|
||||
"reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/35ea4b7f3acabb26f4bb640f8c30866c401da807",
|
||||
"reference": "35ea4b7f3acabb26f4bb640f8c30866c401da807",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba",
|
||||
"reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2476,7 +2383,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.19"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2488,7 +2395,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2022-03-15T09:57:31+00:00"
|
||||
"time": "2022-04-01T12:37:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/cli-parser",
|
||||
@ -2856,16 +2763,16 @@
|
||||
},
|
||||
{
|
||||
"name": "sebastian/environment",
|
||||
"version": "5.1.3",
|
||||
"version": "5.1.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/environment.git",
|
||||
"reference": "388b6ced16caa751030f6a69e588299fa09200ac"
|
||||
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac",
|
||||
"reference": "388b6ced16caa751030f6a69e588299fa09200ac",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7",
|
||||
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2907,7 +2814,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/environment/issues",
|
||||
"source": "https://github.com/sebastianbergmann/environment/tree/5.1.3"
|
||||
"source": "https://github.com/sebastianbergmann/environment/tree/5.1.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2915,7 +2822,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2020-09-28T05:52:38+00:00"
|
||||
"time": "2022-04-03T09:37:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/exporter",
|
||||
@ -3542,5 +3449,5 @@
|
||||
"platform-overrides": {
|
||||
"php": "8.0.0"
|
||||
},
|
||||
"plugin-api-version": "2.2.0"
|
||||
"plugin-api-version": "2.3.0"
|
||||
}
|
||||
|
@ -173,10 +173,37 @@ console:
|
||||
title-tick: true
|
||||
|
||||
aliases:
|
||||
#Examples:
|
||||
#showtheversion: version
|
||||
##This section allows you to add, remove or remap command aliases.
|
||||
##A single alias can call one or more other commands (or aliases).
|
||||
##Aliases defined here will override any command aliases declared by plugins or PocketMine-MP itself.
|
||||
|
||||
##To remove an alias, set it to [], like so (note that prefixed aliases like "pocketmine:stop" will remain and can't
|
||||
##be removed):
|
||||
#stop: []
|
||||
|
||||
##Commands are not removed, only their aliases. You can still refer to a command using its full (prefixed)
|
||||
##name, even if all its aliases are overwritten. The full name is usually something like "pocketmine:commandname" or
|
||||
##"pluginname:commandname".
|
||||
#abort: [pocketmine:stop]
|
||||
|
||||
##To add an alias, list the command(s) that it calls:
|
||||
#showtheversion: [version]
|
||||
#savestop: [save-all, stop]
|
||||
|
||||
##To invoke another command with arguments, use $1 to pass the first argument, $2 for the second etc:
|
||||
#giveadmin: [op $1] ## `giveadmin alex` -> `op alex`
|
||||
#kill: [suicide, say "I tried to kill $1"] ## `kill alex` -> `suicide` + `say "I tried to kill alex"`
|
||||
#giverandom: [give $1 $2, say "Someone has just received a $2!"] ## `giverandom alex diamond` -> `give alex diamond` + `say "Someone has just received a diamond!"`
|
||||
|
||||
##To make arguments mandatory (so that the command fails if they are not provided), use $$, e.g. $$1, $$2:
|
||||
#makeadmin: [op $$1] ## `makeadmin alex` -> `op alex`, `makeadmin` with no arguments = error
|
||||
|
||||
##To pass through a range of arguments, put a - (hyphen) after the index:
|
||||
#tpalias: [tp $1-] ## `tpalias 256 70 256` -> `tp 256 70 256` - this passes arguments 1 and everything after it to the `tp` command
|
||||
|
||||
##To change an existing command alias and make it do something else:
|
||||
#tp: [suicide]
|
||||
|
||||
worlds:
|
||||
#These settings will override the generator set in server.properties and allows loading multiple worlds
|
||||
#Example:
|
||||
|
@ -132,6 +132,7 @@ use function get_class;
|
||||
use function ini_set;
|
||||
use function is_array;
|
||||
use function is_dir;
|
||||
use function is_object;
|
||||
use function is_resource;
|
||||
use function is_string;
|
||||
use function json_decode;
|
||||
@ -1092,6 +1093,7 @@ class Server{
|
||||
$creationOptions->setGeneratorClass($generatorClass);
|
||||
$creationOptions->setGeneratorOptions($generatorOptions);
|
||||
|
||||
$creationOptions->setDifficulty($this->getDifficulty());
|
||||
if(isset($options["difficulty"]) && is_string($options["difficulty"])){
|
||||
$creationOptions->setDifficulty(World::getDifficultyFromString($options["difficulty"]));
|
||||
}
|
||||
@ -1126,6 +1128,7 @@ class Server{
|
||||
if($convertedSeed !== null){
|
||||
$creationOptions->setSeed($convertedSeed);
|
||||
}
|
||||
$creationOptions->setDifficulty($this->getDifficulty());
|
||||
$this->worldManager->generateWorld($default, $creationOptions);
|
||||
}
|
||||
}
|
||||
@ -1606,7 +1609,7 @@ class Server{
|
||||
"reportPaste" => base64_encode($dump->getEncodedData())
|
||||
], 10, [], $postUrlError);
|
||||
|
||||
if($reply !== null && ($data = json_decode($reply->getBody())) !== null){
|
||||
if($reply !== null && is_object($data = json_decode($reply->getBody()))){
|
||||
if(isset($data->crashId) && isset($data->crashUrl)){
|
||||
$reportId = $data->crashId;
|
||||
$reportUrl = $data->crashUrl;
|
||||
|
@ -31,7 +31,7 @@ use function str_repeat;
|
||||
|
||||
final class VersionInfo{
|
||||
public const NAME = "PocketMine-MP";
|
||||
public const BASE_VERSION = "4.2.5";
|
||||
public const BASE_VERSION = "4.3.4";
|
||||
public const IS_DEVELOPMENT_BUILD = false;
|
||||
public const BUILD_CHANNEL = "stable";
|
||||
|
||||
|
@ -23,9 +23,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\block\inventory;
|
||||
|
||||
use pocketmine\block\BlockLegacyIds;
|
||||
use pocketmine\inventory\SimpleInventory;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\item\ItemIds;
|
||||
use pocketmine\network\mcpe\protocol\BlockEventPacket;
|
||||
use pocketmine\network\mcpe\protocol\types\BlockPosition;
|
||||
use pocketmine\world\Position;
|
||||
@ -50,7 +50,7 @@ class ShulkerBoxInventory extends SimpleInventory implements BlockInventory{
|
||||
}
|
||||
|
||||
public function canAddItem(Item $item) : bool{
|
||||
if($item->getId() === BlockLegacyIds::UNDYED_SHULKER_BOX || $item->getId() === BlockLegacyIds::SHULKER_BOX){
|
||||
if($item->getId() === ItemIds::UNDYED_SHULKER_BOX || $item->getId() === ItemIds::SHULKER_BOX){
|
||||
return false;
|
||||
}
|
||||
return parent::canAddItem($item);
|
||||
|
@ -44,7 +44,7 @@ trait ContainerTrait{
|
||||
abstract public function getRealInventory();
|
||||
|
||||
protected function loadItems(CompoundTag $tag) : void{
|
||||
if(($inventoryTag = $tag->getTag(Container::TAG_ITEMS)) instanceof ListTag){
|
||||
if(($inventoryTag = $tag->getTag(Container::TAG_ITEMS)) instanceof ListTag && $inventoryTag->getTagType() === NBT::TAG_Compound){
|
||||
$inventory = $this->getRealInventory();
|
||||
$listeners = $inventory->getListeners()->toArray();
|
||||
$inventory->getListeners()->remove(...$listeners); //prevent any events being fired by initialization
|
||||
|
@ -282,6 +282,7 @@ abstract class Entity{
|
||||
|
||||
public function setNameTagVisible(bool $value = true) : void{
|
||||
$this->nameTagVisible = $value;
|
||||
$this->networkPropertiesDirty = true;
|
||||
}
|
||||
|
||||
public function setNameTagAlwaysVisible(bool $value = true) : void{
|
||||
@ -768,17 +769,29 @@ abstract class Entity{
|
||||
}
|
||||
|
||||
protected function broadcastMovement(bool $teleport = false) : void{
|
||||
$this->server->broadcastPackets($this->hasSpawned, [MoveActorAbsolutePacket::create(
|
||||
$this->id,
|
||||
$this->getOffsetPosition($this->location),
|
||||
$this->location->pitch,
|
||||
$this->location->yaw,
|
||||
$this->location->yaw,
|
||||
(
|
||||
($teleport ? MoveActorAbsolutePacket::FLAG_TELEPORT : 0) |
|
||||
($this->onGround ? MoveActorAbsolutePacket::FLAG_GROUND : 0)
|
||||
)
|
||||
)]);
|
||||
if($teleport){
|
||||
//TODO: HACK! workaround for https://github.com/pmmp/PocketMine-MP/issues/4394
|
||||
//this happens because MoveActor*Packet doesn't clear interpolation targets on the client, so the entity
|
||||
//snaps to the teleport position, but then lerps back to the original position if a normal movement for the
|
||||
//entity was recently broadcasted. This can be seen with players throwing ender pearls.
|
||||
//TODO: remove this if the bug ever gets fixed (lol)
|
||||
foreach($this->hasSpawned as $player){
|
||||
$this->despawnFrom($player);
|
||||
$this->spawnTo($player);
|
||||
}
|
||||
}else{
|
||||
$this->server->broadcastPackets($this->hasSpawned, [MoveActorAbsolutePacket::create(
|
||||
$this->id,
|
||||
$this->getOffsetPosition($this->location),
|
||||
$this->location->pitch,
|
||||
$this->location->yaw,
|
||||
$this->location->yaw,
|
||||
(
|
||||
//TODO: if the above hack for #4394 gets removed, we should be setting FLAG_TELEPORT here
|
||||
($this->onGround ? MoveActorAbsolutePacket::FLAG_GROUND : 0)
|
||||
)
|
||||
)]);
|
||||
}
|
||||
}
|
||||
|
||||
protected function broadcastMotion() : void{
|
||||
|
@ -173,8 +173,6 @@ final class EntityFactory{
|
||||
$this->register(Human::class, function(World $world, CompoundTag $nbt) : Human{
|
||||
return new Human(Helper::parseLocation($nbt, $world), Human::parseSkinNBT($nbt), $nbt);
|
||||
}, ['Human']);
|
||||
|
||||
PaintingMotive::init();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -55,6 +55,7 @@ use pocketmine\network\mcpe\protocol\types\DeviceOS;
|
||||
use pocketmine\network\mcpe\protocol\types\entity\EntityIds;
|
||||
use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataProperties;
|
||||
use pocketmine\network\mcpe\protocol\types\entity\StringMetadataProperty;
|
||||
use pocketmine\network\mcpe\protocol\types\GameMode;
|
||||
use pocketmine\network\mcpe\protocol\types\inventory\ItemStackWrapper;
|
||||
use pocketmine\network\mcpe\protocol\types\PlayerListEntry;
|
||||
use pocketmine\player\Player;
|
||||
@ -473,6 +474,7 @@ class Human extends Living implements ProjectileSource, InventoryHolder{
|
||||
$this->location->yaw,
|
||||
$this->location->yaw, //TODO: head yaw
|
||||
ItemStackWrapper::legacy(TypeConverter::getInstance()->coreItemStackToNet($this->getInventory()->getItemInHand())),
|
||||
GameMode::SURVIVAL,
|
||||
$this->getAllNetworkData(),
|
||||
AdventureSettingsPacket::create(0, 0, 0, 0, 0, $this->getId()), //TODO
|
||||
[], //TODO: entity links
|
||||
|
@ -24,6 +24,8 @@ declare(strict_types=1);
|
||||
namespace pocketmine\entity\object;
|
||||
|
||||
class PaintingMotive{
|
||||
private static bool $initialized = false;
|
||||
|
||||
/** @var PaintingMotive[] */
|
||||
protected static $motives = [];
|
||||
|
||||
@ -76,6 +78,9 @@ class PaintingMotive{
|
||||
* @return PaintingMotive[]
|
||||
*/
|
||||
public static function getAll() : array{
|
||||
if(!self::$initialized){
|
||||
self::init();
|
||||
}
|
||||
return self::$motives;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,9 @@ namespace pocketmine\event\entity;
|
||||
use pocketmine\entity\Entity;
|
||||
|
||||
/**
|
||||
* Called when a entity is despawned
|
||||
* Called when an entity is removed from the world. This could be for a variety of reasons, including chunks being
|
||||
* unloaded, entity death, etc.
|
||||
*
|
||||
* @phpstan-extends EntityEvent<Entity>
|
||||
*/
|
||||
class EntityDespawnEvent extends EntityEvent{
|
||||
|
@ -31,7 +31,11 @@ use pocketmine\utils\Utils;
|
||||
use pocketmine\world\Position;
|
||||
|
||||
/**
|
||||
* Called when a entity explodes
|
||||
* Called when an entity explodes, after the explosion's impact has been calculated.
|
||||
* No changes have been made to the world at this stage.
|
||||
*
|
||||
* @see ExplosionPrimeEvent
|
||||
*
|
||||
* @phpstan-extends EntityEvent<Entity>
|
||||
*/
|
||||
class EntityExplodeEvent extends EntityEvent implements Cancellable{
|
||||
@ -47,12 +51,16 @@ class EntityExplodeEvent extends EntityEvent implements Cancellable{
|
||||
protected $yield;
|
||||
|
||||
/**
|
||||
* @param Block[] $blocks
|
||||
* @param Block[] $blocks
|
||||
* @param float $yield 0-100
|
||||
*/
|
||||
public function __construct(Entity $entity, Position $position, array $blocks, float $yield){
|
||||
$this->entity = $entity;
|
||||
$this->position = $position;
|
||||
$this->blocks = $blocks;
|
||||
if($yield < 0.0 || $yield > 100.0){
|
||||
throw new \InvalidArgumentException("Yield must be in range 0.0 - 100.0");
|
||||
}
|
||||
$this->yield = $yield;
|
||||
}
|
||||
|
||||
@ -61,6 +69,8 @@ class EntityExplodeEvent extends EntityEvent implements Cancellable{
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of blocks destroyed by the explosion.
|
||||
*
|
||||
* @return Block[]
|
||||
*/
|
||||
public function getBlockList() : array{
|
||||
@ -68,6 +78,8 @@ class EntityExplodeEvent extends EntityEvent implements Cancellable{
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the blocks destroyed by the explosion.
|
||||
*
|
||||
* @param Block[] $blocks
|
||||
*/
|
||||
public function setBlockList(array $blocks) : void{
|
||||
@ -75,11 +87,22 @@ class EntityExplodeEvent extends EntityEvent implements Cancellable{
|
||||
$this->blocks = $blocks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the percentage chance of drops from each block destroyed by the explosion.
|
||||
* @return float 0-100
|
||||
*/
|
||||
public function getYield() : float{
|
||||
return $this->yield;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the percentage chance of drops from each block destroyed by the explosion.
|
||||
* @param float $yield 0-100
|
||||
*/
|
||||
public function setYield(float $yield) : void{
|
||||
if($yield < 0.0 || $yield > 100.0){
|
||||
throw new \InvalidArgumentException("Yield must be in range 0.0 - 100.0");
|
||||
}
|
||||
$this->yield = $yield;
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,8 @@ namespace pocketmine\event\entity;
|
||||
use pocketmine\entity\Entity;
|
||||
|
||||
/**
|
||||
* Called when a entity is spawned
|
||||
* Called when an entity is added to the world. This might be a new entity or an entity loaded from storage.
|
||||
*
|
||||
* @phpstan-extends EntityEvent<Entity>
|
||||
*/
|
||||
class EntitySpawnEvent extends EntityEvent{
|
||||
|
@ -28,7 +28,11 @@ use pocketmine\event\Cancellable;
|
||||
use pocketmine\event\CancellableTrait;
|
||||
|
||||
/**
|
||||
* Called when a entity decides to explode
|
||||
* Called when an entity decides to explode, before the explosion's impact is calculated.
|
||||
* This allows changing the force of the explosion and whether it will destroy blocks.
|
||||
*
|
||||
* @see EntityExplodeEvent
|
||||
*
|
||||
* @phpstan-extends EntityEvent<Entity>
|
||||
*/
|
||||
class ExplosionPrimeEvent extends EntityEvent implements Cancellable{
|
||||
@ -40,6 +44,9 @@ class ExplosionPrimeEvent extends EntityEvent implements Cancellable{
|
||||
private $blockBreaking;
|
||||
|
||||
public function __construct(Entity $entity, float $force){
|
||||
if($force <= 0){
|
||||
throw new \InvalidArgumentException("Explosion radius must be positive");
|
||||
}
|
||||
$this->entity = $entity;
|
||||
$this->force = $force;
|
||||
$this->blockBreaking = true;
|
||||
@ -50,6 +57,9 @@ class ExplosionPrimeEvent extends EntityEvent implements Cancellable{
|
||||
}
|
||||
|
||||
public function setForce(float $force) : void{
|
||||
if($force <= 0){
|
||||
throw new \InvalidArgumentException("Explosion radius must be positive");
|
||||
}
|
||||
$this->force = $force;
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,9 @@ use pocketmine\event\Cancellable;
|
||||
use pocketmine\event\CancellableTrait;
|
||||
|
||||
/**
|
||||
* Called when a dropped item tries to despawn due to its despawn delay running out.
|
||||
* Cancelling the event will reset the despawn delay to default (5 minutes).
|
||||
*
|
||||
* @phpstan-extends EntityEvent<ItemEntity>
|
||||
*/
|
||||
class ItemDespawnEvent extends EntityEvent implements Cancellable{
|
||||
|
@ -26,6 +26,15 @@ namespace pocketmine\event\entity;
|
||||
use pocketmine\entity\object\ItemEntity;
|
||||
|
||||
/**
|
||||
* Called when an item is spawned or loaded.
|
||||
*
|
||||
* Some possible reasons include:
|
||||
* - item is loaded from disk
|
||||
* - player dropping an item
|
||||
* - block drops
|
||||
* - loot of a player or entity
|
||||
*
|
||||
* @see PlayerDropItemEvent
|
||||
* @phpstan-extends EntityEvent<ItemEntity>
|
||||
*/
|
||||
class ItemSpawnEvent extends EntityEvent{
|
||||
|
@ -29,8 +29,17 @@ use pocketmine\event\Event;
|
||||
use pocketmine\inventory\transaction\InventoryTransaction;
|
||||
|
||||
/**
|
||||
* Called when there is a transaction between two Inventory objects.
|
||||
* The source of this can be a Player, entities, mobs, or even hoppers in the future!
|
||||
* Called when a player performs actions involving items in inventories.
|
||||
*
|
||||
* This may involve multiple inventories, and may include actions such as:
|
||||
* - moving items from one slot to another
|
||||
* - splitting itemstacks
|
||||
* - dragging itemstacks across inventory slots (slot painting)
|
||||
* - dropping an item on the ground
|
||||
* - taking an item from the creative inventory menu
|
||||
* - destroying (trashing) an item
|
||||
*
|
||||
* @see https://doc.pmmp.io/en/rtfd/developer-reference/inventory-transactions.html for more information on inventory transactions
|
||||
*/
|
||||
class InventoryTransactionEvent extends Event implements Cancellable{
|
||||
use CancellableTrait;
|
||||
|
@ -53,9 +53,6 @@ class PlayerChangeSkinEvent extends PlayerEvent implements Cancellable{
|
||||
return $this->newSkin;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \InvalidArgumentException if the specified skin is not valid
|
||||
*/
|
||||
public function setNewSkin(Skin $skin) : void{
|
||||
$this->newSkin = $skin;
|
||||
}
|
||||
|
@ -28,12 +28,10 @@ use pocketmine\event\CancellableTrait;
|
||||
use pocketmine\player\Player;
|
||||
|
||||
/**
|
||||
* Called when a player runs a command or chats, early in the process
|
||||
* Called when a player runs a command or chats, before it is processed.
|
||||
*
|
||||
* You don't want to use this except for a few cases like logging commands,
|
||||
* blocking commands on certain places, or applying modifiers.
|
||||
*
|
||||
* The message contains a slash at the start
|
||||
* If the message is prefixed with a / (forward slash), it will be interpreted as a command.
|
||||
* Otherwise, it will be broadcasted as a chat message.
|
||||
*/
|
||||
class PlayerCommandPreprocessEvent extends PlayerEvent implements Cancellable{
|
||||
use CancellableTrait;
|
||||
|
@ -29,7 +29,7 @@ use pocketmine\item\Item;
|
||||
use pocketmine\player\Player;
|
||||
|
||||
/**
|
||||
* Called when a player tries to drop an item from its hotbar
|
||||
* Called when a player tries to drop an item
|
||||
*/
|
||||
class PlayerDropItemEvent extends PlayerEvent implements Cancellable{
|
||||
use CancellableTrait;
|
||||
|
@ -28,6 +28,11 @@ use pocketmine\event\CancellableTrait;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\player\Player;
|
||||
|
||||
/**
|
||||
* Called when a player's held item changes.
|
||||
* This could be because they selected a different hotbar slot, or because the item in the selected hotbar slot was
|
||||
* changed.
|
||||
*/
|
||||
class PlayerItemHeldEvent extends PlayerEvent implements Cancellable{
|
||||
use CancellableTrait;
|
||||
|
||||
|
@ -29,7 +29,7 @@ use pocketmine\lang\Translatable;
|
||||
use pocketmine\player\Player;
|
||||
|
||||
/**
|
||||
* Called when a player leaves the server
|
||||
* Called when a player is kicked (forcibly disconnected) from the server, e.g. if an operator used /kick.
|
||||
*/
|
||||
class PlayerKickEvent extends PlayerEvent implements Cancellable{
|
||||
use CancellableTrait;
|
||||
@ -46,18 +46,33 @@ class PlayerKickEvent extends PlayerEvent implements Cancellable{
|
||||
$this->reason = $reason;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the message shown on the kicked player's disconnection screen.
|
||||
* This message is also displayed in the console and server log.
|
||||
*/
|
||||
public function setReason(string $reason) : void{
|
||||
$this->reason = $reason;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the message shown on the kicked player's disconnection screen.
|
||||
* This message is also displayed in the console and server log.
|
||||
* When kicked by the /kick command, the default is something like "Kicked by admin.".
|
||||
*/
|
||||
public function getReason() : string{
|
||||
return $this->reason;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the quit message broadcasted to other players.
|
||||
*/
|
||||
public function setQuitMessage(Translatable|string $quitMessage) : void{
|
||||
$this->quitMessage = $quitMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the quit message broadcasted to other players, e.g. "Steve left the game".
|
||||
*/
|
||||
public function getQuitMessage() : Translatable|string{
|
||||
return $this->quitMessage;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ use function count;
|
||||
|
||||
/**
|
||||
* Called when a player connects to the server, prior to authentication taking place.
|
||||
* Cancelling this event will cause the player to be disconnected with the kick message set.
|
||||
* Set a kick reason to cancel the event and disconnect the player with the kick message set.
|
||||
*
|
||||
* This event should be used to decide if the player may continue to login to the server. Do things like checking
|
||||
* bans, whitelisting, server-full etc here.
|
||||
|
@ -27,7 +27,14 @@ use pocketmine\lang\Translatable;
|
||||
use pocketmine\player\Player;
|
||||
|
||||
/**
|
||||
* Called when a player leaves the server
|
||||
* Called when a player disconnects from the server for any reason.
|
||||
*
|
||||
* Some possible reasons include:
|
||||
* - being kicked by an operator
|
||||
* - disconnecting from the game
|
||||
* - timeout due to network connectivity issues
|
||||
*
|
||||
* @see PlayerKickEvent
|
||||
*/
|
||||
class PlayerQuitEvent extends PlayerEvent{
|
||||
|
||||
@ -42,14 +49,23 @@ class PlayerQuitEvent extends PlayerEvent{
|
||||
$this->quitReason = $quitReason;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the quit message broadcasted to other players.
|
||||
*/
|
||||
public function setQuitMessage(Translatable|string $quitMessage) : void{
|
||||
$this->quitMessage = $quitMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the quit message broadcasted to other players, e.g. "Steve left the game".
|
||||
*/
|
||||
public function getQuitMessage() : Translatable|string{
|
||||
return $this->quitMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the disconnect reason shown in the server log and on the console.
|
||||
*/
|
||||
public function getQuitReason() : string{
|
||||
return $this->quitReason;
|
||||
}
|
||||
|
@ -27,6 +27,9 @@ use pocketmine\event\Cancellable;
|
||||
use pocketmine\event\CancellableTrait;
|
||||
use pocketmine\player\Player;
|
||||
|
||||
/**
|
||||
* Called when a player attempts to be transferred to another server, e.g. by using /transferserver.
|
||||
*/
|
||||
class PlayerTransferEvent extends PlayerEvent implements Cancellable{
|
||||
use CancellableTrait;
|
||||
|
||||
@ -44,26 +47,44 @@ class PlayerTransferEvent extends PlayerEvent implements Cancellable{
|
||||
$this->message = $message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the destination server address. This could be an IP or a domain name.
|
||||
*/
|
||||
public function getAddress() : string{
|
||||
return $this->address;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the destination server address.
|
||||
*/
|
||||
public function setAddress(string $address) : void{
|
||||
$this->address = $address;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the destination server port.
|
||||
*/
|
||||
public function getPort() : int{
|
||||
return $this->port;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the destination server port.
|
||||
*/
|
||||
public function setPort(int $port) : void{
|
||||
$this->port = $port;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the disconnect reason shown in the server log and on the console.
|
||||
*/
|
||||
public function getMessage() : string{
|
||||
return $this->message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the disconnect reason shown in the server log and on the console.
|
||||
*/
|
||||
public function setMessage(string $message) : void{
|
||||
$this->message = $message;
|
||||
}
|
||||
|
@ -28,12 +28,18 @@ use pocketmine\event\Cancellable;
|
||||
use pocketmine\event\CancellableTrait;
|
||||
|
||||
/**
|
||||
* Called when any CommandSender runs a command, early in the process
|
||||
* Called when any CommandSender runs a command, before it is parsed.
|
||||
*
|
||||
* You don't want to use this except for a few cases like logging commands,
|
||||
* blocking commands on certain places, or applying modifiers.
|
||||
* This can be used for logging commands, or preprocessing the command string to add custom features (e.g. selectors).
|
||||
*
|
||||
* The message DOES NOT contain a slash at the start
|
||||
* WARNING: DO NOT use this to block commands. Many commands have aliases.
|
||||
* For example, /version can also be invoked using /ver or /about.
|
||||
* To prevent command senders from using certain commands, deny them permission to use the commands you don't want them
|
||||
* to have access to.
|
||||
*
|
||||
* @see Permissible::addAttachment()
|
||||
*
|
||||
* The message DOES NOT begin with a slash.
|
||||
*/
|
||||
class CommandEvent extends ServerEvent implements Cancellable{
|
||||
use CancellableTrait;
|
||||
|
@ -26,7 +26,7 @@ namespace pocketmine\event\server;
|
||||
use pocketmine\updater\UpdateChecker;
|
||||
|
||||
/**
|
||||
* Called when the AutoUpdater receives notification of an available PocketMine-MP update.
|
||||
* Called when the update checker receives notification of an available PocketMine-MP update.
|
||||
* Plugins may use this event to perform actions when an update notification is received.
|
||||
*/
|
||||
class UpdateNotifyEvent extends ServerEvent{
|
||||
|
@ -27,7 +27,7 @@ use pocketmine\world\format\Chunk;
|
||||
use pocketmine\world\World;
|
||||
|
||||
/**
|
||||
* Called when a Chunk is loaded
|
||||
* Called when a Chunk is loaded or newly created by the world generator.
|
||||
*/
|
||||
class ChunkLoadEvent extends ChunkEvent{
|
||||
/** @var bool */
|
||||
@ -38,6 +38,10 @@ class ChunkLoadEvent extends ChunkEvent{
|
||||
$this->newChunk = $newChunk;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the chunk is newly generated.
|
||||
* If false, the chunk was loaded from storage.
|
||||
*/
|
||||
public function isNewChunk() : bool{
|
||||
return $this->newChunk;
|
||||
}
|
||||
|
@ -24,7 +24,8 @@ declare(strict_types=1);
|
||||
namespace pocketmine\event\world;
|
||||
|
||||
/**
|
||||
* Called when a Chunk is populated (after receiving it on the main thread)
|
||||
* Called when a Chunk is fully populated by the world generator.
|
||||
* This means that the terrain has been generated, and all artifacts (e.g. trees, grass, ponds, etc.) have been placed.
|
||||
*/
|
||||
class ChunkPopulateEvent extends ChunkEvent{
|
||||
|
||||
|
@ -27,7 +27,7 @@ use pocketmine\event\Cancellable;
|
||||
use pocketmine\event\CancellableTrait;
|
||||
|
||||
/**
|
||||
* Called when a Chunk is unloaded
|
||||
* Called when a Chunk is unloaded from memory.
|
||||
*/
|
||||
class ChunkUnloadEvent extends ChunkEvent implements Cancellable{
|
||||
use CancellableTrait;
|
||||
|
@ -24,7 +24,7 @@ declare(strict_types=1);
|
||||
namespace pocketmine\event\world;
|
||||
|
||||
/**
|
||||
* Called when a World is initializing
|
||||
* Called when a new world is created/generated.
|
||||
*/
|
||||
class WorldInitEvent extends WorldEvent{
|
||||
|
||||
|
@ -24,7 +24,7 @@ declare(strict_types=1);
|
||||
namespace pocketmine\event\world;
|
||||
|
||||
/**
|
||||
* Called when a World is loaded
|
||||
* Called when a world is loaded or newly created/generated.
|
||||
*/
|
||||
class WorldLoadEvent extends WorldEvent{
|
||||
|
||||
|
@ -24,7 +24,7 @@ declare(strict_types=1);
|
||||
namespace pocketmine\event\world;
|
||||
|
||||
/**
|
||||
* Called when a World is saved
|
||||
* Called when a world is saved. Saving may be triggered manually (e.g. via commands) or automatically (autosave).
|
||||
*/
|
||||
class WorldSaveEvent extends WorldEvent{
|
||||
|
||||
|
@ -27,7 +27,7 @@ use pocketmine\event\Cancellable;
|
||||
use pocketmine\event\CancellableTrait;
|
||||
|
||||
/**
|
||||
* Called when a World is unloaded
|
||||
* Called when a world is unloaded from memory.
|
||||
*/
|
||||
class WorldUnloadEvent extends WorldEvent implements Cancellable{
|
||||
use CancellableTrait;
|
||||
|
@ -148,7 +148,7 @@ class InventoryTransaction{
|
||||
try{
|
||||
$action->validate($this->source);
|
||||
}catch(TransactionValidationException $e){
|
||||
throw new TransactionValidationException(get_class($action) . ": " . $e->getMessage(), 0, $e);
|
||||
throw new TransactionValidationException(get_class($action) . "#" . spl_object_id($action) . ": " . $e->getMessage(), 0, $e);
|
||||
}
|
||||
|
||||
if(!$action->getSourceItem()->isNull()){
|
||||
|
@ -29,6 +29,7 @@ use pocketmine\block\utils\BannerPatternLayer;
|
||||
use pocketmine\block\utils\DyeColor;
|
||||
use pocketmine\data\bedrock\BannerPatternTypeIdMap;
|
||||
use pocketmine\data\bedrock\DyeColorIdMap;
|
||||
use pocketmine\nbt\NBT;
|
||||
use pocketmine\nbt\tag\CompoundTag;
|
||||
use pocketmine\nbt\tag\ListTag;
|
||||
use function count;
|
||||
@ -98,7 +99,7 @@ class Banner extends ItemBlockWallOrFloor{
|
||||
$colorIdMap = DyeColorIdMap::getInstance();
|
||||
$patternIdMap = BannerPatternTypeIdMap::getInstance();
|
||||
$patterns = $tag->getListTag(self::TAG_PATTERNS);
|
||||
if($patterns !== null){
|
||||
if($patterns !== null && $patterns->getTagType() === NBT::TAG_Compound){
|
||||
/** @var CompoundTag $t */
|
||||
foreach($patterns as $t){
|
||||
$patternColor = $colorIdMap->fromInvertedId($t->getInt(self::TAG_PATTERN_COLOR)) ?? DyeColor::BLACK(); //TODO: missing pattern colour should be an error
|
||||
|
@ -42,5 +42,9 @@ class Boat extends Item{
|
||||
return 1200; //400 in PC
|
||||
}
|
||||
|
||||
public function getMaxStackSize() : int{
|
||||
return 1;
|
||||
}
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ class Item implements \JsonSerializable{
|
||||
|
||||
$this->canPlaceOn = [];
|
||||
$canPlaceOn = $tag->getListTag("CanPlaceOn");
|
||||
if($canPlaceOn !== null){
|
||||
if($canPlaceOn !== null && $canPlaceOn->getTagType() === NBT::TAG_String){
|
||||
/** @var StringTag $entry */
|
||||
foreach($canPlaceOn as $entry){
|
||||
$this->canPlaceOn[$entry->getValue()] = $entry->getValue();
|
||||
@ -314,7 +314,7 @@ class Item implements \JsonSerializable{
|
||||
}
|
||||
$this->canDestroy = [];
|
||||
$canDestroy = $tag->getListTag("CanDestroy");
|
||||
if($canDestroy !== null){
|
||||
if($canDestroy !== null && $canDestroy->getTagType() === NBT::TAG_String){
|
||||
/** @var StringTag $entry */
|
||||
foreach($canDestroy as $entry){
|
||||
$this->canDestroy[$entry->getValue()] = $entry->getValue();
|
||||
|
@ -80,11 +80,26 @@ class ItemFactory{
|
||||
$this->register(new Clock(new ItemIdentifier(ItemIds::CLOCK, 0), "Clock"));
|
||||
$this->register(new Clownfish(new ItemIdentifier(ItemIds::CLOWNFISH, 0), "Clownfish"));
|
||||
$this->register(new Coal(new ItemIdentifier(ItemIds::COAL, 0), "Coal"));
|
||||
$this->register(new ItemBlockWallOrFloor(new ItemIdentifier(ItemIds::CORAL_FAN, 0), VanillaBlocks::CORAL_FAN()->setCoralType(CoralType::TUBE()), VanillaBlocks::WALL_CORAL_FAN()->setCoralType(CoralType::TUBE())), true);
|
||||
$this->register(new ItemBlockWallOrFloor(new ItemIdentifier(ItemIds::CORAL_FAN, 1), VanillaBlocks::CORAL_FAN()->setCoralType(CoralType::BRAIN()), VanillaBlocks::WALL_CORAL_FAN()->setCoralType(CoralType::BRAIN())), true);
|
||||
$this->register(new ItemBlockWallOrFloor(new ItemIdentifier(ItemIds::CORAL_FAN, 2), VanillaBlocks::CORAL_FAN()->setCoralType(CoralType::BUBBLE()), VanillaBlocks::WALL_CORAL_FAN()->setCoralType(CoralType::BUBBLE())), true);
|
||||
$this->register(new ItemBlockWallOrFloor(new ItemIdentifier(ItemIds::CORAL_FAN, 3), VanillaBlocks::CORAL_FAN()->setCoralType(CoralType::FIRE()), VanillaBlocks::WALL_CORAL_FAN()->setCoralType(CoralType::FIRE())), true);
|
||||
$this->register(new ItemBlockWallOrFloor(new ItemIdentifier(ItemIds::CORAL_FAN, 4), VanillaBlocks::CORAL_FAN()->setCoralType(CoralType::HORN()), VanillaBlocks::WALL_CORAL_FAN()->setCoralType(CoralType::HORN())), true);
|
||||
|
||||
foreach([
|
||||
0 => CoralType::TUBE(),
|
||||
1 => CoralType::BRAIN(),
|
||||
2 => CoralType::BUBBLE(),
|
||||
3 => CoralType::FIRE(),
|
||||
4 => CoralType::HORN()
|
||||
] as $meta => $coralType){
|
||||
$this->register(new ItemBlockWallOrFloor(
|
||||
new ItemIdentifier(ItemIds::CORAL_FAN, $meta),
|
||||
VanillaBlocks::CORAL_FAN()->setCoralType($coralType)->setDead(false),
|
||||
VanillaBlocks::WALL_CORAL_FAN()->setCoralType($coralType)->setDead(false)
|
||||
), true);
|
||||
$this->register(new ItemBlockWallOrFloor(
|
||||
new ItemIdentifier(ItemIds::CORAL_FAN_DEAD, $meta),
|
||||
VanillaBlocks::CORAL_FAN()->setCoralType($coralType)->setDead(true),
|
||||
VanillaBlocks::WALL_CORAL_FAN()->setCoralType($coralType)->setDead(true)
|
||||
), true);
|
||||
}
|
||||
|
||||
$this->register(new Coal(new ItemIdentifier(ItemIds::COAL, 1), "Charcoal"));
|
||||
$this->register(new CocoaBeans(new ItemIdentifier(ItemIds::DYE, 3), "Cocoa Beans"));
|
||||
$this->register(new Compass(new ItemIdentifier(ItemIds::COMPASS, 0), "Compass"));
|
||||
|
@ -25,5 +25,9 @@ namespace pocketmine\item;
|
||||
|
||||
class Minecart extends Item{
|
||||
|
||||
public function getMaxStackSize() : int{
|
||||
return 1;
|
||||
}
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
@ -1829,6 +1829,10 @@ final class KnownTranslationFactory{
|
||||
]);
|
||||
}
|
||||
|
||||
public static function pocketmine_plugin_mainClassAbstract() : Translatable{
|
||||
return new Translatable(KnownTranslationKeys::POCKETMINE_PLUGIN_MAINCLASSABSTRACT, []);
|
||||
}
|
||||
|
||||
public static function pocketmine_plugin_mainClassNotFound() : Translatable{
|
||||
return new Translatable(KnownTranslationKeys::POCKETMINE_PLUGIN_MAINCLASSNOTFOUND, []);
|
||||
}
|
||||
|
@ -379,6 +379,7 @@ final class KnownTranslationKeys{
|
||||
public const POCKETMINE_PLUGIN_INVALIDMANIFEST = "pocketmine.plugin.invalidManifest";
|
||||
public const POCKETMINE_PLUGIN_LOAD = "pocketmine.plugin.load";
|
||||
public const POCKETMINE_PLUGIN_LOADERROR = "pocketmine.plugin.loadError";
|
||||
public const POCKETMINE_PLUGIN_MAINCLASSABSTRACT = "pocketmine.plugin.mainClassAbstract";
|
||||
public const POCKETMINE_PLUGIN_MAINCLASSNOTFOUND = "pocketmine.plugin.mainClassNotFound";
|
||||
public const POCKETMINE_PLUGIN_MAINCLASSWRONGTYPE = "pocketmine.plugin.mainClassWrongType";
|
||||
public const POCKETMINE_PLUGIN_RESTRICTEDNAME = "pocketmine.plugin.restrictedName";
|
||||
|
@ -67,13 +67,6 @@ use function spl_object_id;
|
||||
* @phpstan-type ContainerOpenClosure \Closure(int $id, Inventory $inventory) : (list<ClientboundPacket>|null)
|
||||
*/
|
||||
class InventoryManager{
|
||||
|
||||
//TODO: HACK!
|
||||
//these IDs are used for 1.16 to restore 1.14ish crafting & inventory behaviour; since they don't seem to have any
|
||||
//effect on the behaviour of inventory transactions I don't currently plan to integrate these into the main system.
|
||||
private const RESERVED_WINDOW_ID_RANGE_START = ContainerIds::LAST - 10;
|
||||
private const HARDCODED_INVENTORY_WINDOW_ID = self::RESERVED_WINDOW_ID_RANGE_START + 2;
|
||||
|
||||
/** @var Player */
|
||||
private $player;
|
||||
/** @var NetworkSession */
|
||||
@ -84,15 +77,6 @@ class InventoryManager{
|
||||
/** @var int */
|
||||
private $lastInventoryNetworkId = ContainerIds::FIRST;
|
||||
|
||||
/**
|
||||
* TODO: HACK! This tracks GUIs for inventories that the server considers "always open" so that the client can't
|
||||
* open them twice. (1.16 hack)
|
||||
* @var true[]
|
||||
* @phpstan-var array<int, true>
|
||||
* @internal
|
||||
*/
|
||||
protected $openHardcodedWindows = [];
|
||||
|
||||
/**
|
||||
* @var Item[][]
|
||||
* @phpstan-var array<int, array<int, Item>>
|
||||
@ -104,6 +88,10 @@ class InventoryManager{
|
||||
/** @phpstan-var ObjectSet<ContainerOpenClosure> */
|
||||
private ObjectSet $containerOpenCallbacks;
|
||||
|
||||
private ?int $pendingCloseWindowId = null;
|
||||
/** @phpstan-var \Closure() : void */
|
||||
private ?\Closure $pendingOpenWindowCallback = null;
|
||||
|
||||
public function __construct(Player $player, NetworkSession $session){
|
||||
$this->player = $player;
|
||||
$this->session = $session;
|
||||
@ -125,6 +113,12 @@ class InventoryManager{
|
||||
$this->windowMap[$id] = $inventory;
|
||||
}
|
||||
|
||||
private function addDynamic(Inventory $inventory) : int{
|
||||
$this->lastInventoryNetworkId = max(ContainerIds::FIRST, ($this->lastInventoryNetworkId + 1) % ContainerIds::LAST);
|
||||
$this->add($this->lastInventoryNetworkId, $inventory);
|
||||
return $this->lastInventoryNetworkId;
|
||||
}
|
||||
|
||||
private function remove(int $id) : void{
|
||||
unset($this->windowMap[$id], $this->initiatedSlotChanges[$id]);
|
||||
}
|
||||
@ -168,21 +162,47 @@ class InventoryManager{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* When the server initiates a window close, it does so by sending a ContainerClose to the client, which causes the
|
||||
* client to behave as if it initiated the close itself. It responds by sending a ContainerClose back to the server,
|
||||
* which the server is then expected to respond to.
|
||||
*
|
||||
* Sending the client a new window before sending this final response creates buggy behaviour on the client, which
|
||||
* is problematic when switching windows. Therefore, we defer sending any new windows until after the client
|
||||
* responds to our window close instruction, so that we can complete the window handshake correctly.
|
||||
*
|
||||
* This is a pile of complicated garbage that only exists because Mojang overengineered the process of opening and
|
||||
* closing inventory windows.
|
||||
*
|
||||
* @phpstan-param \Closure() : void $func
|
||||
*/
|
||||
private function openWindowDeferred(\Closure $func) : void{
|
||||
if($this->pendingCloseWindowId !== null){
|
||||
$this->session->getLogger()->debug("Deferring opening of new window, waiting for close ack of window $this->pendingCloseWindowId");
|
||||
$this->pendingOpenWindowCallback = $func;
|
||||
}else{
|
||||
$func();
|
||||
}
|
||||
}
|
||||
|
||||
public function onCurrentWindowChange(Inventory $inventory) : void{
|
||||
$this->onCurrentWindowRemove();
|
||||
$this->add($this->lastInventoryNetworkId = max(ContainerIds::FIRST, ($this->lastInventoryNetworkId + 1) % self::RESERVED_WINDOW_ID_RANGE_START), $inventory);
|
||||
|
||||
foreach($this->containerOpenCallbacks as $callback){
|
||||
$pks = $callback($this->lastInventoryNetworkId, $inventory);
|
||||
if($pks !== null){
|
||||
foreach($pks as $pk){
|
||||
$this->session->sendDataPacket($pk);
|
||||
$this->openWindowDeferred(function() use ($inventory) : void{
|
||||
$windowId = $this->addDynamic($inventory);
|
||||
|
||||
foreach($this->containerOpenCallbacks as $callback){
|
||||
$pks = $callback($windowId, $inventory);
|
||||
if($pks !== null){
|
||||
foreach($pks as $pk){
|
||||
$this->session->sendDataPacket($pk);
|
||||
}
|
||||
$this->syncContents($inventory);
|
||||
return;
|
||||
}
|
||||
$this->syncContents($inventory);
|
||||
return;
|
||||
}
|
||||
}
|
||||
throw new \LogicException("Unsupported inventory type");
|
||||
throw new \LogicException("Unsupported inventory type");
|
||||
});
|
||||
}
|
||||
|
||||
/** @phpstan-return ObjectSet<ContainerOpenClosure> */
|
||||
@ -218,31 +238,32 @@ class InventoryManager{
|
||||
}
|
||||
|
||||
public function onClientOpenMainInventory() : void{
|
||||
$id = self::HARDCODED_INVENTORY_WINDOW_ID;
|
||||
if(!isset($this->openHardcodedWindows[$id])){
|
||||
//TODO: HACK! this restores 1.14ish behaviour, but this should be able to be listened to and
|
||||
//controlled by plugins. However, the player is always a subscriber to their own inventory so it
|
||||
//doesn't integrate well with the regular container system right now.
|
||||
$this->openHardcodedWindows[$id] = true;
|
||||
$this->onCurrentWindowRemove();
|
||||
|
||||
$this->openWindowDeferred(function() : void{
|
||||
$windowId = $this->addDynamic($this->player->getInventory());
|
||||
|
||||
$this->session->sendDataPacket(ContainerOpenPacket::entityInv(
|
||||
InventoryManager::HARDCODED_INVENTORY_WINDOW_ID,
|
||||
$windowId,
|
||||
WindowTypes::INVENTORY,
|
||||
$this->player->getId()
|
||||
));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public function onCurrentWindowRemove() : void{
|
||||
if(isset($this->windowMap[$this->lastInventoryNetworkId])){
|
||||
$this->remove($this->lastInventoryNetworkId);
|
||||
$this->session->sendDataPacket(ContainerClosePacket::create($this->lastInventoryNetworkId, true));
|
||||
if($this->pendingCloseWindowId !== null){
|
||||
throw new AssumptionFailedError("We should not have opened a new window while a window was waiting to be closed");
|
||||
}
|
||||
$this->pendingCloseWindowId = $this->lastInventoryNetworkId;
|
||||
}
|
||||
}
|
||||
|
||||
public function onClientRemoveWindow(int $id) : void{
|
||||
if(isset($this->openHardcodedWindows[$id])){
|
||||
unset($this->openHardcodedWindows[$id]);
|
||||
}elseif($id === $this->lastInventoryNetworkId){
|
||||
if($id === $this->lastInventoryNetworkId){
|
||||
$this->remove($id);
|
||||
$this->player->removeCurrentWindow();
|
||||
}else{
|
||||
@ -252,6 +273,13 @@ class InventoryManager{
|
||||
//Always send this, even if no window matches. If we told the client to close a window, it will behave as if it
|
||||
//initiated the close and expect an ack.
|
||||
$this->session->sendDataPacket(ContainerClosePacket::create($id, false));
|
||||
|
||||
if($this->pendingOpenWindowCallback !== null && $id === $this->pendingCloseWindowId){
|
||||
$this->session->getLogger()->debug("Opening deferred window after close ack of window $id");
|
||||
$this->pendingCloseWindowId = null;
|
||||
($this->pendingOpenWindowCallback)();
|
||||
$this->pendingOpenWindowCallback = null;
|
||||
}
|
||||
}
|
||||
|
||||
public function syncSlot(Inventory $inventory, int $slot) : void{
|
||||
|
@ -125,6 +125,7 @@ use function get_class;
|
||||
use function in_array;
|
||||
use function json_encode;
|
||||
use function ksort;
|
||||
use function strcasecmp;
|
||||
use function strlen;
|
||||
use function strtolower;
|
||||
use function substr;
|
||||
@ -635,7 +636,7 @@ class NetworkSession{
|
||||
continue;
|
||||
}
|
||||
$info = $existingSession->getPlayerInfo();
|
||||
if($info !== null && ($info->getUsername() === $this->info->getUsername() || $info->getUuid()->equals($this->info->getUuid()))){
|
||||
if($info !== null && (strcasecmp($info->getUsername(), $this->info->getUsername()) === 0 || $info->getUuid()->equals($this->info->getUuid()))){
|
||||
if($kickForXUIDMismatch($info instanceof XboxLivePlayerInfo ? $info->getXuid() : "")){
|
||||
return;
|
||||
}
|
||||
@ -722,6 +723,7 @@ class NetworkSession{
|
||||
}
|
||||
|
||||
public function onServerRespawn() : void{
|
||||
$this->syncAttributes($this->player, $this->player->getAttributeMap()->getAll());
|
||||
$this->player->sendData(null);
|
||||
|
||||
$this->syncAdventureSettings($this->player);
|
||||
|
@ -48,9 +48,16 @@ final class RuntimeBlockMapping{
|
||||
/** @var CompoundTag[] */
|
||||
private $bedrockKnownStates;
|
||||
|
||||
private function __construct(){
|
||||
private static function make() : self{
|
||||
return new self(
|
||||
Path::join(\pocketmine\BEDROCK_DATA_PATH, "canonical_block_states.nbt"),
|
||||
Path::join(\pocketmine\BEDROCK_DATA_PATH, "r12_to_current_block_map.bin")
|
||||
);
|
||||
}
|
||||
|
||||
public function __construct(string $canonicalBlockStatesFile, string $r12ToCurrentBlockMapFile){
|
||||
$stream = PacketSerializer::decoder(
|
||||
Utils::assumeNotFalse(file_get_contents(Path::join(\pocketmine\BEDROCK_DATA_PATH, "canonical_block_states.nbt")), "Missing required resource file"),
|
||||
Utils::assumeNotFalse(file_get_contents($canonicalBlockStatesFile), "Missing required resource file"),
|
||||
0,
|
||||
new PacketSerializerContext(GlobalItemTypeDictionary::getInstance()->getDictionary())
|
||||
);
|
||||
@ -60,15 +67,15 @@ final class RuntimeBlockMapping{
|
||||
}
|
||||
$this->bedrockKnownStates = $list;
|
||||
|
||||
$this->setupLegacyMappings();
|
||||
$this->setupLegacyMappings($r12ToCurrentBlockMapFile);
|
||||
}
|
||||
|
||||
private function setupLegacyMappings() : void{
|
||||
private function setupLegacyMappings(string $r12ToCurrentBlockMapFile) : void{
|
||||
$legacyIdMap = LegacyBlockIdToStringIdMap::getInstance();
|
||||
/** @var R12ToCurrentBlockMapEntry[] $legacyStateMap */
|
||||
$legacyStateMap = [];
|
||||
$legacyStateMapReader = PacketSerializer::decoder(
|
||||
Utils::assumeNotFalse(file_get_contents(Path::join(\pocketmine\BEDROCK_DATA_PATH, "r12_to_current_block_map.bin")), "Missing required resource file"),
|
||||
Utils::assumeNotFalse(file_get_contents($r12ToCurrentBlockMapFile), "Missing required resource file"),
|
||||
0,
|
||||
new PacketSerializerContext(GlobalItemTypeDictionary::getInstance()->getDictionary())
|
||||
);
|
||||
|
@ -228,8 +228,10 @@ class InGamePacketHandler extends PacketHandler{
|
||||
$this->player->jump();
|
||||
}
|
||||
|
||||
//TODO: this packet has WAYYYYY more useful information that we're not using
|
||||
$this->player->handleMovement($newPos);
|
||||
if(!$this->forceMoveSync){
|
||||
//TODO: this packet has WAYYYYY more useful information that we're not using
|
||||
$this->player->handleMovement($newPos);
|
||||
}
|
||||
|
||||
$packetHandled = true;
|
||||
|
||||
@ -457,13 +459,10 @@ class InGamePacketHandler extends PacketHandler{
|
||||
if(!$this->player->consumeHeldItem()){
|
||||
$hungerAttr = $this->player->getAttributeMap()->get(Attribute::HUNGER) ?? throw new AssumptionFailedError();
|
||||
$hungerAttr->markSynchronized(false);
|
||||
$this->inventoryManager->syncSlot($this->player->getInventory(), $this->player->getInventory()->getHeldItemIndex());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if(!$this->player->useHeldItem()){
|
||||
$this->inventoryManager->syncSlot($this->player->getInventory(), $this->player->getInventory()->getHeldItemIndex());
|
||||
}
|
||||
$this->player->useHeldItem();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -483,7 +482,6 @@ class InGamePacketHandler extends PacketHandler{
|
||||
* Internal function used to execute rollbacks when an action fails on a block.
|
||||
*/
|
||||
private function onFailedBlockAction(Vector3 $blockPos, ?int $face) : void{
|
||||
$this->inventoryManager->syncSlot($this->player->getInventory(), $this->player->getInventory()->getHeldItemIndex());
|
||||
if($blockPos->distanceSquared($this->player->getLocation()) < 10000){
|
||||
$blocks = $blockPos->sidesArray();
|
||||
if($face !== null){
|
||||
@ -512,14 +510,10 @@ class InGamePacketHandler extends PacketHandler{
|
||||
//TODO: use transactiondata for rollbacks here
|
||||
switch($data->getActionType()){
|
||||
case UseItemOnEntityTransactionData::ACTION_INTERACT:
|
||||
if(!$this->player->interactEntity($target, $data->getClickPosition())){
|
||||
$this->inventoryManager->syncSlot($this->player->getInventory(), $this->player->getInventory()->getHeldItemIndex());
|
||||
}
|
||||
$this->player->interactEntity($target, $data->getClickPosition());
|
||||
return true;
|
||||
case UseItemOnEntityTransactionData::ACTION_ATTACK:
|
||||
if(!$this->player->attackEntity($target)){
|
||||
$this->inventoryManager->syncSlot($this->player->getInventory(), $this->player->getInventory()->getHeldItemIndex());
|
||||
}
|
||||
$this->player->attackEntity($target);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ final class ChunkSerializer{
|
||||
|
||||
//TODO: right now we don't support 3D natively, so we just 3Dify our 2D biomes so they fill the column
|
||||
$encodedBiomePalette = self::serializeBiomesAsPalette($chunk);
|
||||
$stream->put(str_repeat($encodedBiomePalette, 25));
|
||||
$stream->put(str_repeat($encodedBiomePalette, 24));
|
||||
|
||||
$stream->putByte(0); //border block array count
|
||||
//Border block entry format: 1 byte (4 bits X, 4 bits Z). These are however useless since they crash the regular client.
|
||||
|
@ -174,7 +174,7 @@ class UPnP{
|
||||
'/upnp:controlURL'
|
||||
), "xpath query is borked");
|
||||
|
||||
if(count($xpathResult) === 0){
|
||||
if($xpathResult === null || count($xpathResult) === 0){
|
||||
throw new UPnPException("Your router does not support portforwarding");
|
||||
}
|
||||
$controlURL = (string) $xpathResult[0];
|
||||
|
@ -1377,8 +1377,14 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
public function chat(string $message) : bool{
|
||||
$this->removeCurrentWindow();
|
||||
|
||||
//Fast length check, to make sure we don't get hung trying to explode MBs of string ...
|
||||
$maxTotalLength = $this->messageCounter * (self::MAX_CHAT_BYTE_LENGTH + 1);
|
||||
if(strlen($message) > $maxTotalLength){
|
||||
return false;
|
||||
}
|
||||
|
||||
$message = TextFormat::clean($message, false);
|
||||
foreach(explode("\n", $message) as $messagePart){
|
||||
foreach(explode("\n", $message, $this->messageCounter + 1) as $messagePart){
|
||||
if(trim($messagePart) !== "" && strlen($messagePart) <= self::MAX_CHAT_BYTE_LENGTH && mb_strlen($messagePart, 'UTF-8') <= self::MAX_CHAT_CHAR_LENGTH && $this->messageCounter-- > 0){
|
||||
if(strpos($messagePart, './') === 0){
|
||||
$messagePart = substr($messagePart, 1);
|
||||
@ -2309,7 +2315,6 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
|
||||
if($this->isCreative()
|
||||
&& $source->getCause() !== EntityDamageEvent::CAUSE_SUICIDE
|
||||
&& $source->getCause() !== EntityDamageEvent::CAUSE_VOID
|
||||
){
|
||||
$source->cancel();
|
||||
}elseif($this->allowFlight && $source->getCause() === EntityDamageEvent::CAUSE_FALL){
|
||||
@ -2368,6 +2373,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
if(parent::teleport($pos, $yaw, $pitch)){
|
||||
|
||||
$this->removeCurrentWindow();
|
||||
$this->stopSleep();
|
||||
|
||||
$this->sendPosition($this->location, $this->location->yaw, $this->location->pitch, MovePlayerPacket::MODE_TELEPORT);
|
||||
$this->broadcastMovement(true);
|
||||
@ -2379,7 +2385,6 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
if($this->spawnChunkLoadCount !== -1){
|
||||
$this->spawnChunkLoadCount = 0;
|
||||
}
|
||||
$this->stopSleep();
|
||||
$this->blockBreakHandler = null;
|
||||
|
||||
//TODO: workaround for player last pos not getting updated
|
||||
@ -2476,7 +2481,6 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
return false;
|
||||
}
|
||||
|
||||
//TODO: client side race condition here makes the opening work incorrectly
|
||||
$this->removeCurrentWindow();
|
||||
|
||||
if(($inventoryManager = $this->getNetworkSession()->getInvManager()) === null){
|
||||
|
@ -166,6 +166,14 @@ class PluginManager{
|
||||
)));
|
||||
return null;
|
||||
}
|
||||
$reflect = new \ReflectionClass($mainClass); //this shouldn't throw; we already checked that it exists
|
||||
if(!$reflect->isInstantiable()){
|
||||
$this->server->getLogger()->error($language->translate(KnownTranslationFactory::pocketmine_plugin_loadError(
|
||||
$description->getName(),
|
||||
KnownTranslationFactory::pocketmine_plugin_mainClassAbstract()
|
||||
)));
|
||||
return null;
|
||||
}
|
||||
|
||||
$permManager = PermissionManager::getInstance();
|
||||
foreach($description->getPermissions() as $permsGroup){
|
||||
@ -463,8 +471,12 @@ class PluginManager{
|
||||
}
|
||||
|
||||
public function tickSchedulers(int $currentTick) : void{
|
||||
foreach($this->enabledPlugins as $p){
|
||||
$p->getScheduler()->mainThreadHeartbeat($currentTick);
|
||||
foreach($this->enabledPlugins as $pluginName => $p){
|
||||
if(isset($this->enabledPlugins[$pluginName])){
|
||||
//the plugin may have been disabled as a result of updating other plugins' schedulers, and therefore
|
||||
//removed from enabledPlugins; however, foreach will still see it due to copy-on-write
|
||||
$p->getScheduler()->mainThreadHeartbeat($currentTick);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,6 +64,13 @@ class ZippedResourcePack implements ResourcePack{
|
||||
if(!file_exists($zipPath)){
|
||||
throw new ResourcePackException("File not found");
|
||||
}
|
||||
$size = filesize($zipPath);
|
||||
if($size === false){
|
||||
throw new ResourcePackException("Unable to determine size of file");
|
||||
}
|
||||
if($size === 0){
|
||||
throw new ResourcePackException("Empty file, probably corrupted");
|
||||
}
|
||||
|
||||
$archive = new \ZipArchive();
|
||||
if(($openResult = $archive->open($zipPath)) !== true){
|
||||
|
@ -64,6 +64,9 @@ class ThreadManager extends \Volatile{
|
||||
*/
|
||||
public function getAll() : array{
|
||||
$array = [];
|
||||
/**
|
||||
* @var Worker|Thread $thread
|
||||
*/
|
||||
foreach($this as $key => $thread){
|
||||
$array[$key] = $thread;
|
||||
}
|
||||
|
@ -32,7 +32,6 @@ use function curl_getinfo;
|
||||
use function curl_init;
|
||||
use function curl_setopt_array;
|
||||
use function explode;
|
||||
use function is_int;
|
||||
use function is_string;
|
||||
use function preg_match;
|
||||
use function socket_close;
|
||||
@ -220,7 +219,6 @@ class Internet{
|
||||
}
|
||||
if(!is_string($raw)) throw new AssumptionFailedError("curl_exec() should return string|false when CURLOPT_RETURNTRANSFER is set");
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
if(!is_int($httpCode)) throw new AssumptionFailedError("curl_getinfo(CURLINFO_HTTP_CODE) always returns int");
|
||||
$headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
|
||||
$rawHeaders = substr($raw, 0, $headerSize);
|
||||
$body = substr($raw, $headerSize);
|
||||
|
@ -59,6 +59,7 @@ use function interface_exists;
|
||||
use function is_a;
|
||||
use function is_array;
|
||||
use function is_bool;
|
||||
use function is_float;
|
||||
use function is_infinite;
|
||||
use function is_int;
|
||||
use function is_nan;
|
||||
@ -437,6 +438,19 @@ final class Utils{
|
||||
return $lines;
|
||||
}
|
||||
|
||||
private static function stringifyValueForTrace(mixed $value, int $maxStringLength) : string{
|
||||
return match(true){
|
||||
is_object($value) => "object " . self::getNiceClassName($value) . "#" . spl_object_id($value),
|
||||
is_array($value) => "array[" . count($value) . "]",
|
||||
is_string($value) => "string[" . strlen($value) . "] " . substr(Utils::printable($value), 0, $maxStringLength),
|
||||
is_bool($value) => $value ? "true" : "false",
|
||||
is_int($value) => "int " . $value,
|
||||
is_float($value) => "float " . $value,
|
||||
$value === null => "null",
|
||||
default => gettype($value) . " " . Utils::printable((string) $value)
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed[][] $trace
|
||||
* @phpstan-param list<array<string, mixed>> $trace
|
||||
@ -453,22 +467,15 @@ final class Utils{
|
||||
}else{
|
||||
$args = $trace[$i]["params"];
|
||||
}
|
||||
/** @var mixed[] $args */
|
||||
|
||||
$params = implode(", ", array_map(function($value) use($maxStringLength) : string{
|
||||
if(is_object($value)){
|
||||
return "object " . self::getNiceClassName($value) . "#" . spl_object_id($value);
|
||||
}
|
||||
if(is_array($value)){
|
||||
return "array[" . count($value) . "]";
|
||||
}
|
||||
if(is_string($value)){
|
||||
return "string[" . strlen($value) . "] " . substr(Utils::printable($value), 0, $maxStringLength);
|
||||
}
|
||||
if(is_bool($value)){
|
||||
return $value ? "true" : "false";
|
||||
}
|
||||
return gettype($value) . " " . Utils::printable((string) $value);
|
||||
}, $args));
|
||||
$paramsList = [];
|
||||
$offset = 0;
|
||||
foreach($args as $argId => $value){
|
||||
$paramsList[] = ($argId === $offset ? "" : "$argId: ") . self::stringifyValueForTrace($value, $maxStringLength);
|
||||
$offset++;
|
||||
}
|
||||
$params = implode(", ", $paramsList);
|
||||
}
|
||||
$messages[] = "#$i " . (isset($trace[$i]["file"]) ? Filesystem::cleanPath($trace[$i]["file"]) : "") . "(" . (isset($trace[$i]["line"]) ? $trace[$i]["line"] : "") . "): " . (isset($trace[$i]["class"]) ? $trace[$i]["class"] . (($trace[$i]["type"] === "dynamic" || $trace[$i]["type"] === "->") ? "->" : "::") : "") . $trace[$i]["function"] . "(" . Utils::printable($params) . ")";
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ use pocketmine\world\utils\SubChunkExplorer;
|
||||
use pocketmine\world\utils\SubChunkExplorerStatus;
|
||||
use function ceil;
|
||||
use function floor;
|
||||
use function min;
|
||||
use function mt_rand;
|
||||
use function sqrt;
|
||||
|
||||
@ -95,9 +96,6 @@ class Explosion{
|
||||
|
||||
$blockFactory = BlockFactory::getInstance();
|
||||
|
||||
$currentChunk = null;
|
||||
$currentSubChunk = null;
|
||||
|
||||
$mRays = $this->rays - 1;
|
||||
for($i = 0; $i < $this->rays; ++$i){
|
||||
for($j = 0; $j < $this->rays; ++$j){
|
||||
@ -156,10 +154,8 @@ class Explosion{
|
||||
* and creating sounds and particles.
|
||||
*/
|
||||
public function explodeB() : bool{
|
||||
$updateBlocks = [];
|
||||
|
||||
$source = (new Vector3($this->source->x, $this->source->y, $this->source->z))->floor();
|
||||
$yield = (1 / $this->size) * 100;
|
||||
$yield = min(100, (1 / $this->size) * 100);
|
||||
|
||||
if($this->what instanceof Entity){
|
||||
$ev = new EntityExplodeEvent($this->what, $this->source, $this->affectedBlocks, $yield);
|
||||
|
@ -2653,8 +2653,13 @@ class World implements ChunkManager{
|
||||
unset($this->changedBlocks[$chunkHash]);
|
||||
|
||||
if(array_key_exists($chunkHash, $this->chunkPopulationRequestMap)){
|
||||
$this->logger->debug("Rejecting population promise for chunk $x $z");
|
||||
$this->chunkPopulationRequestMap[$chunkHash]->reject();
|
||||
unset($this->chunkPopulationRequestMap[$chunkHash]);
|
||||
if(isset($this->activeChunkPopulationTasks[$chunkHash])){
|
||||
$this->logger->debug("Marking population task for chunk $x $z as orphaned");
|
||||
$this->activeChunkPopulationTasks[$chunkHash] = false;
|
||||
}
|
||||
}
|
||||
|
||||
$this->timings->doChunkUnload->stopTiming();
|
||||
@ -2830,7 +2835,7 @@ class World implements ChunkManager{
|
||||
unset($this->chunkPopulationRequestQueueIndex[$nextChunkHash]);
|
||||
World::getXZ($nextChunkHash, $nextChunkX, $nextChunkZ);
|
||||
if(isset($this->chunkPopulationRequestMap[$nextChunkHash])){
|
||||
assert(!isset($this->activeChunkPopulationTasks[$nextChunkHash]), "Population for chunk $nextChunkX $nextChunkZ already running");
|
||||
assert(!($this->activeChunkPopulationTasks[$nextChunkHash] ?? false), "Population for chunk $nextChunkX $nextChunkZ already running");
|
||||
if(
|
||||
!$this->orderChunkPopulation($nextChunkX, $nextChunkZ, null)->isResolved() &&
|
||||
!isset($this->activeChunkPopulationTasks[$nextChunkHash])
|
||||
@ -2999,10 +3004,13 @@ class World implements ChunkManager{
|
||||
}
|
||||
|
||||
$index = World::chunkHash($x, $z);
|
||||
if(!isset($this->chunkPopulationRequestMap[$index])){
|
||||
$this->logger->debug("Discarding population result for chunk x=$x,z=$z - promise was already broken");
|
||||
if(!isset($this->activeChunkPopulationTasks[$index])){
|
||||
throw new AssumptionFailedError("This should always be set, regardless of whether the task was orphaned or not");
|
||||
}
|
||||
if(!$this->activeChunkPopulationTasks[$index]){
|
||||
$this->logger->debug("Discarding orphaned population result for chunk x=$x,z=$z");
|
||||
unset($this->activeChunkPopulationTasks[$index]);
|
||||
}elseif(isset($this->activeChunkPopulationTasks[$index])){
|
||||
}else{
|
||||
if($dirtyChunks === 0){
|
||||
$oldChunk = $this->loadChunk($x, $z);
|
||||
$this->setChunk($x, $z, $chunk);
|
||||
@ -3035,9 +3043,14 @@ class World implements ChunkManager{
|
||||
unset($this->activeChunkPopulationTasks[$index]);
|
||||
|
||||
if($dirtyChunks === 0){
|
||||
$promise = $this->chunkPopulationRequestMap[$index];
|
||||
unset($this->chunkPopulationRequestMap[$index]);
|
||||
$promise->resolve($chunk);
|
||||
$promise = $this->chunkPopulationRequestMap[$index] ?? null;
|
||||
if($promise !== null){
|
||||
unset($this->chunkPopulationRequestMap[$index]);
|
||||
$promise->resolve($chunk);
|
||||
}else{
|
||||
//Handlers of ChunkPopulateEvent, ChunkLoadEvent, or just ChunkListeners can cause this
|
||||
$this->logger->debug("Unable to resolve population promise for chunk x=$x,z=$z - populated chunk was forcibly unloaded while setting modified chunks");
|
||||
}
|
||||
}else{
|
||||
//request failed, stick it back on the queue
|
||||
//we didn't resolve the promise or touch it in any way, so any fake chunk loaders are still valid and
|
||||
|
@ -114,6 +114,9 @@ abstract class LightUpdate{
|
||||
$context->removalQueue->enqueue([$x, $y, $z, $oldLevel]);
|
||||
}
|
||||
}
|
||||
}elseif($this->getEffectiveLight($x, $y, $z) > 0){ //outside the chunk (e.g. virtual sky light from y=256)
|
||||
$context->spreadVisited[$blockHash] = true;
|
||||
$context->spreadQueue->enqueue([$x, $y, $z]);
|
||||
}
|
||||
}
|
||||
return $context;
|
||||
|
@ -36,6 +36,7 @@ use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataFlags;
|
||||
use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataProperties;
|
||||
use pocketmine\network\mcpe\protocol\types\entity\FloatMetadataProperty;
|
||||
use pocketmine\network\mcpe\protocol\types\entity\LongMetadataProperty;
|
||||
use pocketmine\network\mcpe\protocol\types\GameMode;
|
||||
use pocketmine\network\mcpe\protocol\types\inventory\ItemStack;
|
||||
use pocketmine\network\mcpe\protocol\types\inventory\ItemStackWrapper;
|
||||
use pocketmine\network\mcpe\protocol\types\PlayerListEntry;
|
||||
@ -117,6 +118,7 @@ class FloatingTextParticle implements Particle{
|
||||
0,
|
||||
0,
|
||||
ItemStackWrapper::legacy(ItemStack::null()),
|
||||
GameMode::SURVIVAL,
|
||||
$actorMetadata,
|
||||
AdventureSettingsPacket::create(0, 0, 0, 0, 0, $this->entityId),
|
||||
[],
|
||||
|
@ -610,6 +610,11 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/NetworkSession.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method getAttributeMap\\(\\) on pocketmine\\\\player\\\\Player\\|null\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/NetworkSession.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method getLanguage\\(\\) on pocketmine\\\\player\\\\Player\\|null\\.$#"
|
||||
count: 1
|
||||
@ -665,6 +670,11 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/NetworkSession.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$entity of method pocketmine\\\\network\\\\mcpe\\\\NetworkSession\\:\\:syncAttributes\\(\\) expects pocketmine\\\\entity\\\\Living, pocketmine\\\\player\\\\Player\\|null given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/NetworkSession.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$for of method pocketmine\\\\network\\\\mcpe\\\\NetworkSession\\:\\:syncAdventureSettings\\(\\) expects pocketmine\\\\player\\\\Player, pocketmine\\\\player\\\\Player\\|null given\\.$#"
|
||||
count: 2
|
||||
@ -905,11 +915,6 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/scheduler/TaskScheduler.php
|
||||
|
||||
-
|
||||
message: "#^Method pocketmine\\\\thread\\\\ThreadManager\\:\\:getAll\\(\\) should return array\\<pocketmine\\\\thread\\\\Thread\\|pocketmine\\\\thread\\\\Worker\\> but returns array\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/thread/ThreadManager.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset string on mixed\\.$#"
|
||||
count: 3
|
||||
@ -925,16 +930,6 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/utils/Config.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$offset of function substr expects int, mixed given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/utils/Internet.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$length of function substr expects int\\|null, mixed given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/utils/Internet.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$string of function trim expects string, string\\|false given\\.$#"
|
||||
count: 1
|
||||
@ -960,11 +955,6 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/utils/Utils.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$array of function array_map expects array, mixed given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/utils/Utils.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method getFullBlock\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#"
|
||||
count: 1
|
||||
|
@ -40,6 +40,11 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/handler/InGamePacketHandler.php
|
||||
|
||||
-
|
||||
message: "#^Negated boolean expression is always true\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/handler/InGamePacketHandler.php
|
||||
|
||||
-
|
||||
message: "#^Property pocketmine\\\\network\\\\mcpe\\\\raklib\\\\PthreadsChannelWriter\\:\\:\\$buffer is never read, only written\\.$#"
|
||||
count: 1
|
||||
@ -85,8 +90,3 @@ parameters:
|
||||
count: 2
|
||||
path: ../../../src/world/format/io/region/RegionLoader.php
|
||||
|
||||
-
|
||||
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotSame\\(\\) with arguments stdClass, stdClass and 'Cloning registry…' will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: ../../phpunit/utils/CloningRegistryTraitTest.php
|
||||
|
||||
|
Reference in New Issue
Block a user