Dylan K. Taylor
38d6284671
Use PHP-CS-Fixer to enforce file header presence
2022-06-04 17:34:49 +01: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
PJZ9n
f4f5c3128f
EnumTrait: fixed regex not accepting member names with 1 character
...
this also fixes EnumTrait accepting invalid non-numeric characters for the first character, such as @.
2022-03-19 16:47:36 +00:00
Dylan K. Taylor
62435fe935
Standardize clone denying
2021-09-03 21:07:39 +01:00
Dylan K. Taylor
b026ada489
Standardize serialize denying
2021-09-03 21:07:10 +01:00
Dylan K. Taylor
1170c8fe13
EnumTrait: override __clone, __sleep, __wakeup to prevent duplication
2021-06-29 19:55:43 +01:00
Dylan K. Taylor
3dd33cd35e
Get rid of EnumTrait::fromString()
...
it's better to just implement this for stuff where there's explicitly designated aliases, otherwise we could end up with unexpected BC breaks (e.g. hardcoding POSTWORLD in plugin.yml would suddenly break if the core enum was changed, even though it remained valid).
2021-06-27 20:52:56 +01:00
Dylan K. Taylor
ae75d73f48
Extract MainLoggerThread unit from MainLogger
...
MainLogger is no longer a Thread, as per the recent changes to pocketmine/log-pthreads.
2021-02-04 16:28:49 +00:00
Dylan K. Taylor
9228f006d4
Merge remote-tracking branch 'origin/stable'
...
# Conflicts:
# composer.json
# composer.lock
# resources/vanilla
# src/CrashDump.php
# src/PocketMine.php
# src/pocketmine/Server.php
# src/pocketmine/item/Bucket.php
# src/pocketmine/item/Item.php
# src/pocketmine/level/format/Chunk.php
# src/pocketmine/level/format/io/leveldb/LevelDB.php
# src/pocketmine/level/format/io/region/McRegion.php
# src/pocketmine/network/mcpe/protocol/BatchPacket.php
# src/pocketmine/tile/Furnace.php
# src/pocketmine/utils/UUID.php
# src/utils/ServerKiller.php
2020-12-20 20:54:13 +00:00
Dylan K. Taylor
b96565faa4
Drop some obviously useless static function variables
...
these are better suited as constant literals.
2020-09-05 18:39:47 +01:00
Dylan K. Taylor
f93bc0739c
Force types of RegistryTrait usages to shut PHPStan up
...
we need generic traits to solve this problem properly.
2020-05-21 19:12:48 +01:00
Dylan K. Taylor
9c33ea8dd1
EnumTrait: use a better method to initialize enums
...
this method is simpler, and is also safe at the native type level.
Coincidentally, it also eliminates 30 PHPStan false-positives.
2020-02-01 20:33:30 +00:00
Dylan K. Taylor
67bcc1c0fb
phpdoc armageddon for master, pass 1
2020-01-22 11:55:03 +00:00
Dylan K. Taylor
a7d51a273d
EnumTrait: add a numeric runtimeID field for arrays and switches
2019-08-17 16:36:05 +01:00
Dylan K. Taylor
5499ac620c
Removed pocketmine subdirectory, map PSR-4 style
2019-07-30 19:14:57 +01:00