15085 Commits

Author SHA1 Message Date
Dylan K. Taylor
5e9dbace90
Merge branch 'minor-next' into major-next 2024-12-05 10:13:24 +00:00
Dylan K. Taylor
9a6e258b6c
Merge branch 'stable' of github.com:pmmp/PocketMine-MP into minor-next 2024-12-05 10:13:06 +00:00
Dylan K. Taylor
205aabe11f
Fixed merge error 2024-12-04 15:27:09 +00:00
pmmp-restrictedactions-bot[bot]
a1448bfb88 5.22.1 is next
Commit created by: https://github.com/pmmp/RestrictedActions/actions/runs/12160926590
2024-12-04 13:38:41 +00:00
Dries C
ba6828c6bd
Release 5.22.0 (Bedrock 1.21.50 support) (#6559)
Co-authored-by: Dylan K. Taylor <dktapps@pmmp.io>
2024-12-04 13:36:52 +00:00
pmmp-restrictedactions-bot[bot]
007673cb96 Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/12111121061
2024-12-02 01:41:02 +00:00
pmmp-restrictedactions-bot[bot]
ae9b4dbb05 Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/12111121061
2024-12-02 01:41:01 +00:00
Doge
0dae786a21
feat(Server): add a setter for maxPlayers (#6261) 2024-12-01 20:24:50 +00:00
IvanCraft623
f1a3b42620
Implement frost walker enchantment (#5497)
Co-authored-by: Dylan T. <dktapps@pmmp.io>
2024-12-01 19:46:38 +00:00
IvanCraft623
f3763ae691
Implement Recovery compass (#5502)
Co-authored-by: Dylan K. Taylor <dktapps@pmmp.io>
2024-12-01 18:25:45 +00:00
Dylan K. Taylor
12214792b3
Allow eating in creative & peaceful
closes #5923
closes #6056
2024-12-01 17:42:26 +00:00
Dylan T.
93a9007f3c
Added ClosureCommand (#6063)
this is intended to replace PluginCommand and CommandExecutor, both of which are overengineered and unfit for purpose.
Allowing a closure allows much greater flexibility.

We can't use this within the core yet, as plugins will expect PluginBase->getCommand() to return PluginCommand (with its associated setExecutor() and similar APIs).
However, I think this is useful enough to add by itself.
2024-12-01 15:10:07 +00:00
Dylan K. Taylor
02d181d0c8
Merge branch 'minor-next' into major-next 2024-12-01 15:02:36 +00:00
Dylan K. Taylor
a593180ef9
Deprecate some stuff 2024-12-01 15:01:41 +00:00
Dylan T.
61560ec375
Support for collecting timings from threads, and implement async task timings (#6333)
The following callbacks can now be registered in timings, to allow threads to be notified of these events:
- Turning on/off (`TimingsHandler::getToggleCallbacks()->add(...)`)
- Reset (`TimingsHandler::getReloadCallbacks()->add(...)`)
- Collect (`TimingsHandler::getCollectCallbacks()->add(...)`)

Collect callbacks must return `list<Promise>`. The promises must be `resolve()`d with `list<string>` of printed timings records, as returned by `TimingsHandler::printCurrentThreadRecords()`. It's recommended to use 1 promise per thread.

A timings report will be produced once all promises have been resolved.

This system is used internally to collect timings for async tasks (closes #6166).

For timings viewer developers:
Timings format version has been bumped to 3 to accommodate this change. Timings groups should now include a `ThreadId`  at the end of timings group names to ensure that their record IDs are segregated correctly, as they could otherwise conflict between threads. The main thread is not required to specify a thread ID. See pmmp/timings@13cefa6279 for implementation examples.

New PHPStan error is caused by phpstan/phpstan#10924
2024-12-01 14:49:27 +00:00
Muqsit
44771c892d
Use PlayerAuthInputPacket::SNEAKING flag to test for sneaking (#6544)
This binds internal sneaking to whether or not the player is currently pressing the shift key, which fixes #5792 and fixes #5903.

However, it does introduce visual issues with sneaking, as explained in #6548. This needs to be worked on separately. For now, it's better we trade 2 functional bugs for 1 visual bug.
2024-12-01 13:14:30 +00:00
pmmp-restrictedactions-bot[bot]
2fc6bbe84e Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/12092463227
2024-11-30 01:35:08 +00:00
pmmp-restrictedactions-bot[bot]
89f88a9333 Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/12092463227
2024-11-30 01:35:06 +00:00
pmmp-restrictedactions-bot[bot]
9cab72ed59 5.21.3 is next
Commit created by: https://github.com/pmmp/RestrictedActions/actions/runs/12090411351
2024-11-29 20:43:17 +00:00
Dylan T.
2bd9f4108b
5.21.2 (#6545) 2024-11-29 20:42:14 +00:00
pmmp-restrictedactions-bot[bot]
a078f653f4 Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/12042121495
2024-11-27 01:39:13 +00:00
Akmal Fairuz
269effcecf
Introduce Utils::getRandomFloat() (#6532)
Drop-in replacement for lcg_value() for PHP 8.4
2024-11-26 11:33:29 +00:00
pmmp-restrictedactions-bot[bot]
ed33983792 Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/12022106146
2024-11-26 01:36:42 +00:00
Dylan K. Taylor
905a10e980
Deprecate InventoryAction->onAddToTransaction()
this never made any sense
2024-11-25 21:39:35 +00:00
Dylan K. Taylor
52fe2cb97f
PermissionManager: deprecate permission subscription system
this is no longer used by the core, and as far as I can tell no plugin uses it either.
it was used in the past for chat broadcast channels, but not anymore.
2024-11-25 21:29:26 +00:00
Dylan K. Taylor
15eaf67a0c
Merge branch 'minor-next' into major-next 2024-11-25 14:36:25 +00:00
Dylan K. Taylor
12ae8dc03b
Merge branch 'stable' into minor-next 2024-11-25 14:32:30 +00:00
Dylan K. Taylor
a9787f0d99
Fix PHPStan error 2024-11-25 14:32:17 +00:00
Dylan K. Taylor
5325ecee37
Deal with a whole lot of PHPStan suppressed key casting errors
closes #6534
2024-11-25 14:30:58 +00:00
Dylan T.
d72941c36c
Update IceBomb.php 2024-11-24 23:56:44 +00:00
Dylan K. Taylor
e51903d7ea
Merge branch 'minor-next' into major-next 2024-11-24 23:51:07 +00:00
Dylan K. Taylor
30ee0aa63d
Merge branch 'stable' into minor-next 2024-11-24 23:50:56 +00:00
Dylan K. Taylor
aef4fa7174
Remove unused variable 2024-11-24 23:50:30 +00:00
Dylan K. Taylor
53aa380ca3
Candle: fix extinguish logic
closes #5983
2024-11-24 23:49:32 +00:00
zSALLAZAR
a5f607138c
Implement Ice Bomb (#5452)
Co-authored-by: Dylan K. Taylor <dktapps@pmmp.io>
2024-11-24 15:01:26 +00:00
ShockedPlot7560
8338ebaffd
Add generic types for TaskHandler (#6030) 2024-11-24 14:14:34 +00:00
pmmp-restrictedactions-bot[bot]
c61434d87b Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/11964819241
2024-11-22 01:36:17 +00:00
pmmp-restrictedactions-bot[bot]
a523ed6e40 Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/11964819241
2024-11-22 01:36:16 +00:00
GameParrot
7c2ed7d884
Fix insta break check (#6528) 2024-11-21 02:22:10 +00:00
pmmp-restrictedactions-bot[bot]
dcc258706f Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/11944832380
2024-11-21 01:27:14 +00:00
Dylan T.
9195c88670
ConsoleReader: Use proc_open()'s socket support to send commands back to the main server process (#5273)
Support for this was introduced in PHP 8.0, though not mentioned in any changelog: php/php-src#5777

This simplifies the subprocess handling considerably. However, there is a potential for problems if PHP generates any E_* errors, since these get written to STDOUT as well.
To avoid error messages being treated as a command, a hash is attached to each IPC message, seeded with an incrementing counter. This prevents error messages causing command replays or unintended commands.

Unfortunately, PHP doesn't support binding pipes other than stdin/stdout/stderr on Windows for the child process, so we have to use stdout for this. In the future, if it becomes possible, a dedicated pipe for the purpose should be introduced. We'd need something like php://fd/<number> to work on Windows.
2024-11-20 14:56:52 +00:00
pmmp-restrictedactions-bot[bot]
820e2d4a2f Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/11924942897
2024-11-20 01:27:32 +00:00
pmmp-restrictedactions-bot[bot]
ae19d05fd5 Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/11924942897
2024-11-20 01:27:30 +00:00
Markus Staab
e710b3750f
Adjust pretty name of closures on PHP 8.4 (#6351)
related to https://github.com/php/php-src/pull/13550

see analog symfony change: https://github.com/symfony/symfony/pull/54614
2024-11-19 17:05:21 +00:00
pmmp-restrictedactions-bot[bot]
0fb1415f7f Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/11904511045
2024-11-19 01:36:12 +00:00
pmmp-restrictedactions-bot[bot]
8ccd1edb17 Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/11904511045
2024-11-19 01:36:11 +00:00
Akmal Fairuz
faf1e26bac
Fix: implicitly nullable parameter declarations deprecated (#6522) 2024-11-18 23:54:22 +00:00
Dylan T.
a6534ecbbb
Fixed merge error 2024-11-17 01:55:46 +00:00
pmmp-restrictedactions-bot[bot]
330bcd2423 Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/11874902000
2024-11-17 01:39:53 +00:00
ipad54
1555fa17e7
Added ability to pick end crystal item (#6509) 2024-11-16 19:06:03 +00:00