Dylan K. Taylor
1170c8fe13
EnumTrait: override __clone, __sleep, __wakeup to prevent duplication
2021-06-29 19:55:43 +01:00
Dylan T
32d7b1e6af
Start using webmozart/pathutil for joining paths ( #4287 )
2021-06-29 19:40: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
43f71d0d63
FormatConverter: Copy worlds for backup if rename fails
...
this can fail if the backups directory points to a different drive than the original worlds location. In this case, we have to copy and delete the files instead, which is much slower, but works.
I REALLY advise against putting backups on a different mount point than worlds if you plan to convert large worlds.
2021-06-17 20:46:34 +01:00
Dylan K. Taylor
9702b51bd1
Utils: improve how boolean arguments are displayed in stack traces
2021-06-02 21:36:47 +01:00
Dylan K. Taylor
fadc96bb0e
Utils: include spl_object_id() in stack traces
2021-06-02 21:34:19 +01:00
Dylan K. Taylor
624495f4d3
Added a generic Promise type
...
I anticipate increasing demand for promises, and since all the libraries I could find suck, we'll stick to our own impl for now.
2021-05-08 15:57:30 +01:00
Dylan K. Taylor
7139eccfbe
Merge branch 'stable'
2021-03-28 18:11:53 +01:00
Dylan K. Taylor
06f20234f7
Scrub unused imports
2021-03-26 22:56:09 +00:00
Dylan K. Taylor
49438d360d
RegistryUtils: generate ordered doc comments
...
this makes things easier to find, especially in the large ones like VanillaBlocks.
2021-03-22 16:16:28 +00:00
Dylan K. Taylor
72de45f0e9
Drop pocketmine/uuid for ramsey/uuid
2021-03-16 23:03:00 +00:00
Dylan K. Taylor
dff13a884f
Merge branch 'stable'
2021-02-12 17:34:25 +00:00
Dylan K. Taylor
672622950f
ObjectSet: make add() and remove() variadic to match ds
...
there are still some variadic usages in the code, which, infuriatingly, phpstan does not detect (phpstan/phpstan#4528 ).
2021-02-11 15:54:05 +00:00
Dylan K. Taylor
c61f66d973
Removed ext-ds dependency
2021-02-11 15:40:37 +00:00
Dylan K. Taylor
169650dc5b
MainLogger: accept timezone as a constructor parameter
...
this makes it easier to unit-test, as well as making it independent of Timezone.
2021-02-04 21:50:06 +00:00
Dylan K. Taylor
27b1951df7
MainLogger: accept main thread name as a constructor parameter
2021-02-04 20:55:50 +00:00
Dylan K. Taylor
709b4154d7
MainLogger: Require useFormattingCodes as a constructor parameter
...
this avoids needing to call Terminal::init() before starting a MainLogger. Since it inits the formatting codes anyway when log messages are first recorded, it shouldn't be necessary to pre-initialize it.
2021-02-04 19:16:22 +00:00
Dylan K. Taylor
6d64fb9af8
MainLogger: remove obsolete logFile field
2021-02-04 16:51:02 +00:00
Dylan K. Taylor
7684dc03fa
Merge remote-tracking branch 'origin/stable'
2021-02-04 16:45:34 +00: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
4b9639f6c9
Merge branch 'stable'
2021-02-04 15:55:39 +00:00
Dylan K. Taylor
bbae02264d
Merge branch 'stable'
2021-01-27 20:04:13 +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
5f4ef84d52
Clean up imports
2020-12-12 19:48:00 +00:00
Dylan K. Taylor
d39348929f
Removed PLUGIN_PATH constant
2020-12-09 20:48:50 +00:00
Dylan K. Taylor
ff6672ba85
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/utils/Utils.php
2020-12-09 20:27:19 +00:00
Dylan K. Taylor
22c8bdeeeb
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/CrashDump.php
# src/utils/Utils.php
2020-12-09 01:47:05 +00:00
Dylan K. Taylor
531c191431
Finalize Utils class
2020-12-05 18:09:23 +00:00
Dylan K. Taylor
0d9561c93f
Removed crafting data cache from CraftingManager
2020-11-12 21:30:59 +00:00
Dylan K. Taylor
d6ed542fcd
Merge remote-tracking branch 'origin/stable' into master
...
# Conflicts:
# composer.json
# composer.lock
# src/CrashDump.php
# src/pocketmine/Server.php
# src/pocketmine/level/format/io/region/McRegion.php
# tests/phpstan/configs/check-explicit-mixed-baseline.neon
# tests/phpstan/configs/l7-baseline.neon
# tests/phpstan/configs/l8-baseline.neon
# tests/travis/setup-php.yml
2020-10-26 16:18:53 +00:00
Dylan K. Taylor
e11dbf03e2
Process: apply native typehint to kill()
2020-10-09 18:06:33 +01:00
Dylan K. Taylor
40fca0936f
Internet: make getURL() and postURL() return InternetRequestResult objects
...
this reduces the amount of reference parameters, and generally reduces the number of parameters, while guaranteeing consistency of the APIs.
2020-10-09 18:03:20 +01: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
0506905875
clean up unused imports
2020-08-16 00:58:55 +01:00
Dylan K. Taylor
a35ca1fa71
Merge branch 'stable' into master
2020-08-15 20:32:14 +01:00
Dylan K. Taylor
192e31a397
Move code & docblock generation methods out of RegistryTrait
...
this allows generating a docblock / code for a registry without the class needing to exist or be populated yet, which makes code generation significantly less cumbersome.
2020-08-07 21:43:19 +01:00
Dylan K. Taylor
e1d80f05b1
Merge branch 'stable' into master
2020-08-03 20:14:46 +01:00
Dylan K. Taylor
2c29634d03
Remove VERSION and GIT_COMMIT constants
...
these are now lazily computed in VersionInfo as needed.
2020-07-25 19:17:33 +01:00
Dylan K. Taylor
2645b19617
Convert VersionInfo into a final class
...
this allows it to be loaded by the autoloader without additional changes.
2020-07-25 19:00:48 +01:00
Dylan K. Taylor
da798817b5
Merge branch 'stable'
...
# Conflicts:
# changelogs/3.14.md
# resources/vanilla
# src/VersionInfo.php
# src/entity/Attribute.php
2020-07-08 11:46:02 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
a8180cdf0b
Merge commit 'df76c02e7ac3bfbde8ecb597653779e8e1516f58'
...
# Conflicts:
# resources/vanilla
# tests/phpstan/configs/l7-baseline.neon
2020-06-26 19:14:25 +01:00
Dylan K. Taylor
fb059cda69
Merge commit 'a4e250a3e61cbf1e75fe2785e71158f16a4a9039'
...
# Conflicts:
# resources/vanilla
2020-06-17 20:48:19 +01:00
Dylan K. Taylor
8d537eaae8
Merge commit '23b97d8e2dca50cca77061c1080911ab610fa708'
...
# Conflicts:
# resources/vanilla
# tests/phpstan/configs/l8-baseline.neon
2020-06-17 20:47:51 +01:00
Dylan K. Taylor
f55a7f8b53
Merge commit 'd8d994351'
...
# Conflicts:
# composer.lock
# resources/vanilla
# tests/phpstan/configs/l7-baseline.neon
2020-06-14 19:47:21 +01:00
Dylan K. Taylor
9ce531fef4
(master) imports cleanup
2020-06-14 19:29:33 +01:00
Eren A. Akyol
5f79071e4c
Registry Trait: fixed magic methods not working properly when system locale is tr_TR ( #3580 )
...
Fixed incorrect case of incorrect letters on operating systems using languages other than English. Like (Stair => STAİR)
2020-06-14 11:48:15 +01:00
Dylan K. Taylor
5f0f5236f8
RegistryTrait: fix crash when child classes don't define getAll()
2020-06-13 18:34:23 +01:00
Dylan K. Taylor
dba059d8da
Merge commit 'a7f10d8cc'
...
# Conflicts:
# resources/vanilla
2020-06-13 11:52:17 +01:00
Dylan K. Taylor
0025196a81
Merge branch 'next-minor'
...
# Conflicts:
# resources/vanilla
# src/network/upnp/UPnP.php
2020-05-23 11:16:19 +01:00