Dylan K. Taylor
38d6284671
Use PHP-CS-Fixer to enforce file header presence
2022-06-04 17:34:49 +01:00
Dylan K. Taylor
2f32bd877a
Replace disallowed operators in src/command/
2022-01-20 16:49:58 +00:00
Dylan K. Taylor
889d048ca3
Make use of Utils::assumeNotFalse() in a bunch of places
...
I've stuck to only doing this in the places where I'm sure we should never get false back. Other places I'm less sure of (and I found more bugs along the way).
2021-12-08 19:39:04 +00:00
Dylan K. Taylor
3b7580688c
Stop auto-translating string descriptions/usages for commands
...
Require usage of Translatable for translations.
2021-09-11 16:46:40 +01:00
Dylan K. Taylor
039c59856d
Remove % translation prefixes dotted around all over the place
2021-08-15 20:03:38 +01:00
Dylan K. Taylor
2293bd948d
Added KnownTranslationFactory and use it in as many places as possible
...
this makes translation usage much more statically analysable.
The only places this isn't used are:
- places that prefix translations with colours (those are still a problem)
- places where server/client translations don't match (e.g. gameMode.changed accepts different parameters in vanilla than in PM)
2021-08-10 14:50:40 +01:00
Dylan K. Taylor
94e16f416d
Added KnownTranslationKeys (generated) and start using it
2021-06-29 22:46:04 +01:00
Dylan T
32d7b1e6af
Start using webmozart/pathutil for joining paths ( #4287 )
2021-06-29 19:40:43 +01:00
Dylan K. Taylor
bf7d69b69e
Stop hardcoding permission names everywhere
...
using strings for permission names is nearly as shitty, but this is at least cross-referencable and statically analysable.
2021-06-26 19:14:51 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
2bc0f9f7a2
TimingsCommand: do not enable timings if they are already enabled
...
this causes timings to be reset, which is potentially undesirable (loss of already-collected timing data).
closes #4194
2021-04-27 22:39:13 +01:00
Dylan K. Taylor
b3c6c11b20
BulkCurlTask now accepts a closure callback for onCompletion
...
this requires much less boilerplate code than an anonymous class.
2021-03-16 23:56:14 +00:00
Dylan K. Taylor
c5693598aa
BulkCurlTask constructor now accepts BulkCurlTaskOperation[] instead of shaped arrays
2020-12-20 22:18:03 +00:00
Dylan K. Taylor
5282ae3298
TimingsHandler::printTimings() now returns a list of strings instead of requiring a resource
2020-12-09 22:32:32 +00:00
Dylan K. Taylor
46c57e4e24
TimingsCommand: fixed crash on result handling
...
since AsyncTask->getResult() returns mixed, phpstan has no idea what is being returned here, so it doesn't report any errors.
2020-10-11 11:35:03 +01:00
Dylan K. Taylor
1f90aa07aa
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/command/defaults/TeleportCommand.php
# src/pocketmine/event/entity/EntityDespawnEvent.php
# src/pocketmine/event/entity/EntityInventoryChangeEvent.php
# src/pocketmine/event/entity/EntityLevelChangeEvent.php
# src/pocketmine/event/entity/EntitySpawnEvent.php
# tests/phpstan/configs/actual-problems.neon
2020-06-21 00:30:45 +01:00
Dylan K. Taylor
5a8633f6c0
Merge commit '409c8c170'
...
# Conflicts:
# resources/vanilla
2020-06-13 11:57:58 +01:00
Dylan K. Taylor
da3ba1e2b2
Merge commit 'a27b29897'
...
# Conflicts:
# resources/vanilla
2020-06-13 11:28:03 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
cb16f5c142
Merge commit '260ac47588c76a2e6814cfba46773a990fb8c5da'
...
# Conflicts:
# resources/vanilla
# src/Server.php
# src/lang/Language.php
# src/network/mcpe/protocol/AddItemActorPacket.php
# src/network/mcpe/protocol/AddPlayerPacket.php
# src/network/mcpe/protocol/SetActorDataPacket.php
# src/network/mcpe/serializer/NetworkBinaryStream.php
# src/permission/Permission.php
# src/pocketmine/block/Leaves.php
# src/pocketmine/entity/DataPropertyManager.php
# src/pocketmine/entity/Entity.php
# src/pocketmine/item/Banner.php
# src/pocketmine/item/Item.php
# src/pocketmine/level/format/io/LevelProvider.php
# src/pocketmine/level/format/io/LevelProviderManager.php
# src/pocketmine/network/mcpe/protocol/AddActorPacket.php
# src/pocketmine/network/mcpe/protocol/LoginPacket.php
# src/pocketmine/tile/Banner.php
# src/scheduler/BulkCurlTask.php
# src/updater/AutoUpdater.php
# src/utils/Config.php
# src/utils/Utils.php
# src/world/generator/Flat.php
# src/world/generator/Generator.php
2020-01-31 21:07:34 +00:00
Dylan K. Taylor
dedf81a9af
Merge commit 'e61c3e8bf697e5c5c6cddb4843b24279faaf25cb'
2020-01-31 19:12:32 +00:00
Dylan K. Taylor
25ead18369
Merge commit '7ce6c8aa13bd1e8eb5aa3fe267a0116ab43e9313'
2020-01-31 18:55:49 +00:00
Dylan K. Taylor
5499ac620c
Removed pocketmine subdirectory, map PSR-4 style
2019-07-30 19:14:57 +01:00