Commit Graph

12 Commits

Author SHA1 Message Date
31d8cc1cb5 Generate and use constants for pocketmine.yml constant names
a couple of usages of properties that no longer exist couldn't be migrated.
in addition, this revealed a couple of dead properties in the default file.

this is not an ideal solution (I'd much rather model the configs using classes and map them) but in the absence of a good and reliable library to do that, this is the next best thing.
2023-08-25 13:23:38 +01:00
42db3abf5e QueryInfo->setPlayerList() now accepts string[] instead of Player[] (#5476) 2022-12-31 13:04:22 +00:00
38d6284671 Use PHP-CS-Fixer to enforce file header presence 2022-06-04 17:34:49 +01:00
6eac2ea7a5 Modernize private property declarations in src/network 2022-05-17 21:22:33 +01:00
be1996752a Replace disallowed operators in src/network/ 2022-01-20 19:11:32 +00:00
269231c228 Ban foreach(arrayWithStringKeys as k => v)
this is not as good as phpstan/phpstan-src#769 (e.g. array_key_first()/array_key_last() aren't covered by this, nor is array_rand()) but it does eliminate the most infuriating cases where this usually crops up.
2021-11-15 22:52:05 +00:00
902ea515f7 Separate ID handling from GameMode
the aliases of 0,1,2,3 remain for user-interface level compatibility.
2021-06-27 20:32:35 +01:00
981b0285d1 Isolate config casting nastiness in one place
this doesn't solve the underlying problem, but it does reduce the amount of noise made by PHPStan about it, as well as avoiding code litter.
2021-06-19 19:14:02 +01:00
d840e8c4d4 Merge commit 'a34f3261c'
# Conflicts:
#	resources/vanilla
#	src/event/entity/EntityExplodeEvent.php
#	src/pocketmine/event/block/SignChangeEvent.php
#	src/utils/Utils.php
2020-07-04 22:39:40 +01:00
f0669b7770 Merge commit '710c16260'
# Conflicts:
#	resources/vanilla
#	src/network/query/QueryInfo.php
2020-06-13 11:59:00 +01:00
fe649d8d70 Extract ServerConfigGroup from Server
this API isn't very nice, but it's pretty much the same as the original, and at least this can be _kinda_ unit-tested...
2020-05-24 15:48:03 +01:00
23ab6a283b Separate QueryInfo from QueryRegenerateEvent
this removes some useless and confusing APIs from query info.
2020-05-23 11:55:29 +01:00