15073 Commits

Author SHA1 Message Date
Dylan K. Taylor
988da8eaab
Release 4.2.8 4.2.8 2022-04-17 20:45:32 +01:00
Dylan K. Taylor
ea7f706aed
RakLib 0.14.4 2022-04-17 20:41:18 +01:00
Dylan K. Taylor
52e3f1e269
ZippedResourcePack: ensure non-empty file
ZipArchive raises deprecation errors on empty files for some reason
2022-04-17 20:32:23 +01:00
Dylan K. Taylor
4c9d2a989e
cs again 2022-04-17 19:32:30 +01:00
Dylan K. Taylor
022db5cbe3
NetworkSession: compare usernames case-insensitively
the current data management system uses case-insensitive names, so we can't allow different players with the same name in different cases to join, or we will have duplication exploits.

This typically only applies to offline servers, since Xbox Live doesn't permit reuse of a username, same case or otherwise.

closes #4965
2022-04-17 19:28:10 +01:00
Dylan K. Taylor
3bbf558883
4.2.8 is next 2022-04-15 16:36:47 +01:00
Dylan K. Taylor
1d68d9f71a
Release 4.2.7 4.2.7 2022-04-15 16:36:42 +01:00
Dylan K. Taylor
f2e8824242
fix CS 2022-04-15 16:24:15 +01:00
Dylan K. Taylor
a0e47b5a64
phpstan 1.5.6 2022-04-15 16:21:05 +01:00
Dylan K. Taylor
f7465f55e7
Update transient composer dependencies 2022-04-15 16:17:33 +01:00
Dylan K. Taylor
453bf6d73b
fix build 2022-04-10 21:37:10 +01:00
Dylan K. Taylor
3353a00641
List command aliases in /help <commandName> 2022-04-10 21:32:46 +01:00
Dylan K. Taylor
e388cb1643
Merge branch 'stable' into next-minor 2022-04-10 21:23:04 +01:00
Rush2929
741182c55f
InGamePacketHandler: skip processing movement if the player's position
was changed during processing other properties (#4913)

fixes #4952
2022-04-10 21:02:45 +01:00
Dylan K. Taylor
2efce35331
PluginManager: fixed updating disabled scheduler when plugins cause other plugins to be disabled from within scheduled tasks 2022-04-10 21:00:16 +01:00
Dylan T
d1dfbd95e2
Entity: workaround teleport client bug #4394 by despawning and respawning the entity (#4870)
this is a sucky solution but it works well enough for this scenario.

From my research it appears that while the client-side MovementInterpolator is active on the client and hasn't yet reached its target, any teleport sent during the lerp will get overridden by the lerp.
This appears to last 3-4 ticks (about 150-200 ms) which explains why this can be reproduced by stopping movement just before the ender pearl lands (human reaction times would make the reproduction unreliable otherwise).

Things to note:
- All entities are affected by this bug.
- MovePlayerPacket appears not to have the problem, but we can't use it because it doesn't work for non-players.
- MoveActorAbsolute and MoveActorDelta are both handled by the same code and will have the same lerping bug.

This is the cleanest solution I could come up with.
2022-04-08 23:12:01 +01:00
Dylan K. Taylor
4fc712119f
FlowerPot: allow removing the planted item
closes #4896
closes #4898

this is not completely consistent with client-side predictions due to a bug in the client, which I believe is a problem limited to the legacy transaction system.
2022-04-08 23:07:08 +01:00
dependabot[bot]
1aee5b1ed8
Bump ramsey/uuid from 4.2.3 to 4.3.1 (#4929)
Bumps [ramsey/uuid](https://github.com/ramsey/uuid) from 4.2.3 to 4.3.1.
- [Release notes](https://github.com/ramsey/uuid/releases)
- [Changelog](https://github.com/ramsey/uuid/blob/5.x/CHANGELOG.md)
- [Commits](https://github.com/ramsey/uuid/compare/4.2.3...4.3.1)

---
updated-dependencies:
- dependency-name: ramsey/uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dylan T <dktapps@pmmp.io>
2022-04-08 22:22:51 +01:00
Dylan K. Taylor
fefd3e6b29
Document how to passthru arguments to aliased commands 2022-04-07 23:36:04 +01:00
Dylan K. Taylor
9b43be9d9c
Improved documentation of pocketmine.yml aliases 2022-04-07 23:10:18 +01:00
Dylan K. Taylor
ea677154cb
InGamePacketHandler: rely exclusively on prediction mismatch checking to re-sync slots during bad transactions
fixes #4894
closes #4926
relying on the core code to guess which slots should be synced is unreliable at best.
2022-04-04 21:58:19 +01:00
dependabot[bot]
7f2802e75f
Bump phpstan/phpstan from 1.5.3 to 1.5.4 (#4942)
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.5.3 to 1.5.4.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.6.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.5.3...1.5.4)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-04 14:03:07 +01:00
Armen Deroian
f924208881
Update PlayerPreLoginEvent documentation (#4940)
Removed outdated documentation that was very misleading. Replaced with better documentation that accurately describes how to cancel the event.
2022-04-03 17:59:07 +01:00
dependabot[bot]
6bea2961d9
Bump phpunit/phpunit from 9.5.19 to 9.5.20 (#4939)
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.5.19 to 9.5.20.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.19...9.5.20)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-01 23:52:55 +01:00
Dylan K. Taylor
ac3a6033b9
PluginManager: account for possible abstract main classes
idk why anyone does this, but it shouldn't cause a core crash ...
2022-04-01 23:42:37 +01:00
Dylan K. Taylor
d7e6b01216
4.2.7 is next 2022-04-01 23:01:15 +01:00
Dylan K. Taylor
26aee7ff73
Release 4.2.6 4.2.6 2022-04-01 23:01:15 +01:00
Dylan K. Taylor
319c8fe32c
Updated BedrockProtocol 2022-04-01 22:59:43 +01:00
dependabot[bot]
ce121ccea9
Bump phpstan/phpstan from 1.5.2 to 1.5.3 (#4935)
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.5.2 to 1.5.3.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.6.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.5.2...1.5.3)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-31 13:37:32 +01:00
dependabot[bot]
7f1a4185b5
Bump phpstan/phpstan from 1.5.1 to 1.5.2 (#4933)
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.5.1 to 1.5.2.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.6.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.5.1...1.5.2)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-29 12:41:54 +01:00
Dylan K. Taylor
7d1464f0a1
Merge branch 'stable' into next-minor 2022-03-28 17:18:54 +01:00
Dylan K. Taylor
8cc7fb9dd9
fix CS 2022-03-28 17:16:35 +01:00
Dylan K. Taylor
194cb1fb84
phpstan 1.5.1 2022-03-28 17:12:00 +01:00
Dylan K. Taylor
8ea106c091
4.2.6 is next 2022-03-28 16:35:10 +01:00
Dylan K. Taylor
a6cb3313b0
Release 4.2.5 4.2.5 2022-03-28 16:34:57 +01:00
Dylan K. Taylor
c6374b79b0
Improve crashdump ergonomics
hopefully this will result in less people making useless pastes that don't contain backtraces ...
2022-03-24 19:46:11 +00:00
Dylan K. Taylor
f25beab6cb
Use constants for compound meta values 2022-03-23 15:58:27 +00:00
Dylan K. Taylor
901449b0b1
Player: simplify PlayerItemHeldEvent calling on content change
the second parameter to this callback is the OLD slots, not the changed slots. This means that ALL slots are included, including empty and unchanged slots.
2022-03-23 13:47:01 +00:00
Dylan K. Taylor
a9f2766a8b
Merge branch 'stable' into next-minor 2022-03-23 13:39:41 +00:00
Dylan K. Taylor
4e777572c9
fix CS 2022-03-23 13:28:21 +00:00
Dylan K. Taylor
90a8595a40
Check for mismatched inventory slot predictions in transactions
this should limit the problems caused by mismatched gameplay features that result in ghost items, such as #4896.
2022-03-22 17:42:19 +00:00
Dylan K. Taylor
bf71eb448a
Reduce chaos in inventory classes 2022-03-22 17:19:55 +00:00
Dylan K. Taylor
2c29d272ad
BaseInventory: move setMaxStackSize() to a more sensible place 2022-03-22 17:11:48 +00:00
Dylan K. Taylor
98aa2b9ff9
Inventory: move removeItem() next to remove()
this should hopefully be more attention grabbing and a bit less misleading, since people will wonder why there are 'remove' and 'removeItem' both.

we really need to rename one of these...
2022-03-22 17:08:30 +00:00
Dylan K. Taylor
ea33a04d00
Player: ensure that PlayerItemHeldEvent is called when the contents of the held slot changes
in PM3, this was done by implicitly relying on the client to send a MobEquipmentPacket selecting the same hotbar slot when the slot contents changes.
In PM4, we avoid relying on this, and fire the event directly when the listener detects a held slot change.
This ensures that the behaviour remains consistent regardless of what the client starts doing in the future.

closes #4905
2022-03-22 16:53:02 +00:00
Dylan K. Taylor
9963fcf849
PluginManager: return the created RegisteredListener from registerEvent()
this allows the handler to be later unregistered when used with a plain closure instead of a magic `Listener`.
2022-03-22 16:20:37 +00:00
Dylan K. Taylor
ab93135b84
Merge branch 'stable' into next-minor 2022-03-22 15:49:58 +00:00
Dylan K. Taylor
4a94cb85a2
fix CS 2022-03-22 15:44:11 +00:00
Dylan K. Taylor
b7e6854189
RegistryTrait: enforce name validation rules on everything, not just enums
fixes #4916
2022-03-22 15:41:17 +00:00
Dylan K. Taylor
2b8a54f8ff
Entity: added a guard to prevent __construct() from running multiple times
this typically happens due to flawed logic in child classes in plugins which causes parent::__construct() to get called multiple times.
2022-03-22 15:33:31 +00:00