Dylan K. Taylor
19a66a8d03
committing the new strings would have helped ...
2021-10-11 01:14:00 +01:00
Dylan K. Taylor
6d728e8d98
PluginManager: Improved startup performance when loading many plugins
...
for some reason we were reading and parsing the plugin.yml at least twice for every plugin loaded.
We were repeating work already done by the initial loadPlugins() triage (discovering correct loader, loading plugin.yml from disk, parsing plugin.yml, validating plugin.yml) every time loadPlugin() was called with that plugin.
2021-10-11 01:11:59 +01:00
Dylan K. Taylor
e1ee320c8d
PluginManager: Localize plugin loading error messages
2021-10-11 00:58:33 +01:00
Dylan K. Taylor
965a16d19d
PluginManager: Extract deterministic plugin loadability checks into a separate method
2021-10-11 00:49:32 +01:00
Dylan K. Taylor
5bae458a91
changelog: mention that Entity->setPosition(AndRotation)() are now protected
2021-10-10 23:32:40 +01:00
Dylan K. Taylor
2696698926
ClosureTask: relax closure checks to allow arrow functions without return typehints
...
nobody uses return typehints on arrow functions anyway .. they just waste space.
2021-10-10 23:31:57 +01:00
Dylan K. Taylor
912e612743
Utils: allow validateCallableSignature() to accept a manually constructed CallbackType instead of a closure
...
this allows more fine-grained control without PHPStan yelling at us.
2021-10-10 23:27:09 +01:00
Dylan K. Taylor
fd2df637b6
Block: rename getPositionOffset() -> getModelPositionOffset()
...
this gives a better idea of what the function does, and is also much less annoying for auto complete.
2021-10-10 22:35:38 +01:00
Dylan K. Taylor
aa53dc6709
Entity: fixed network properties not updating when fireTicks changes
...
another bug that LBSG knew about, but didn't report. :/
2021-10-09 23:57:37 +01:00
Dylan K. Taylor
c1f843a42c
GarbageCollectorCommand: fixed duplicate MB suffix
2021-10-09 23:57:36 +01:00
Matt
09715906c8
StructureGrowEvent: added API to get the player who caused the growth ( #4445 )
2021-10-09 22:51:46 +01:00
Dylan K. Taylor
ccc881ee58
Switch to custom permission denied message
...
closes #4494
2021-10-09 00:57:15 +01:00
Dylan K. Taylor
308d7c126a
Fixed world data ::generate() functions putting level.dat in the wrong place if the world path didn't end with a /
2021-10-08 23:39:25 +01:00
Dylan K. Taylor
4910250a81
Config: fixed writeList()
2021-10-07 21:47:09 +01:00
Dylan K. Taylor
e0d2e24698
fix CS (again\!)
2021-10-07 21:19:44 +01:00
Dylan K. Taylor
d5f02a0bf8
Config: expose APIs to parse/emit list configs
2021-10-07 21:18:42 +01:00
Dylan K. Taylor
2a3a57c519
Enable parsing/emitting .properties without creating a Config object
...
this is useful when the contents are just going to get passed straight into a model, making Config object redundant anyway.
2021-10-07 20:53:15 +01:00
Dylan K. Taylor
5115387feb
fix CS (again)
2021-10-07 20:43:55 +01:00
Dylan K. Taylor
dd0aaf59b5
MainLogger: Log exceptions as a single block message
2021-10-07 20:40:20 +01:00
Dylan K. Taylor
a555f21b18
MainLogger: write messages before calling logger attachments
2021-10-07 20:32:02 +01:00
Dylan K. Taylor
1be9b2f037
Config: drop packing of arrays
...
we don't handle arrays on decode, so there's no reason to support them on encode either.
2021-10-07 20:30:56 +01:00
Dylan K. Taylor
32fd9879e5
fix CS
2021-10-07 20:16:54 +01:00
Dylan K. Taylor
dc2e8e7e8f
ServerConfigGroup: do not assume that values are always bool|string
2021-10-07 20:02:21 +01:00
Dylan K. Taylor
847e24fc41
4.0.0-BETA5 is next
2021-10-06 23:49:30 +01:00
Dylan K. Taylor
9e6d740570
Release 4.0.0-BETA4
4.0.0-BETA4
2021-10-06 23:49:13 +01:00
Dylan K. Taylor
8e3772ceef
Block: fixed incorrect behaviour of isSameState() for multi-ID blocks
...
fixes #4492
2021-10-06 23:16:03 +01:00
Dylan K. Taylor
90800a4124
Config: Try to coerce types, similar to YAML
2021-10-06 21:09:23 +01:00
Dylan K. Taylor
4b00465e24
Clean PHPStan baselines
2021-10-06 02:14:30 +01:00
Dylan K. Taylor
10b3596eef
PluginDescription: use typed properties
2021-10-06 02:00:55 +01:00
Dylan K. Taylor
258c38f9cd
PluginDescription: loosen invalid permission message (it might be wrong type as well as not existing)
2021-10-06 01:45:40 +01:00
Dylan K. Taylor
d07517fe8b
Use an object to represent command entries in plugin manifest
2021-10-06 01:42:03 +01:00
Dylan K. Taylor
31a176286d
Do not register plugin commands without valid permissions
...
this could lead to harmful results, e.g. if a developer typo'd while writing the plugin.yml, an admin-only command could become accessible to everyone, since commands are by default accessible by everyone.
2021-10-06 01:18:14 +01:00
Dylan K. Taylor
1fafce6d6f
PluginBase: remove special true/false handling for command permissions
...
these aren't accepted as permission names anymore, and they never worked properly anyway.
2021-10-06 01:12:02 +01:00
Dylan K. Taylor
5061bbbc25
fuck you git x2
2021-10-06 01:01:20 +01:00
Dylan K. Taylor
a101d1cdf9
Drop pocketmine.plugin.fileError in favour of pocketmine.plugin.loadError
...
fileError was unnecessarily noisy, putting the directory path on the console twice. This conveys just as much information but with less wasted space.
2021-10-05 23:31:00 +01:00
Dylan K. Taylor
fec48003d9
.....
2021-10-05 20:29:24 +01:00
Dylan K. Taylor
e25c03eec1
Gracefully handle errors loading plugin manifest
...
this isn't perfect, but it covers the common cases.
Now, the server won't spam crashdumps just because some plugin declared nested permissions.
2021-10-05 20:28:43 +01:00
Dylan K. Taylor
7245d15abe
PermissionParser: Throw more specific exceptions
2021-10-05 19:57:26 +01:00
Dylan K. Taylor
13178a47a5
fuck you git
2021-10-05 19:11:10 +01:00
Dylan K. Taylor
817ab88c70
Properly handle errors decoding network item NBT
...
since the NBT is now decoded immediately now, any incorrect NBT will cause exceptions to be thrown that we weren't handling, causing server crashes.
2021-10-05 19:10:55 +01:00
Dylan K. Taylor
fef8297907
GiveCommand: don't crash on bogus item NBT
2021-10-05 19:09:46 +01:00
Dylan K. Taylor
dbeaf27cb7
Document that Item::setNamedTag() may cause NbtException to be thrown
...
if the NBT is bogus for some reason
in PM3, these kinds of bugs wouldn't show up until/unless the item NBT was actually used, but on PM4, we decode it ahead of time, so the errors always show up immediately.
2021-10-05 19:09:22 +01:00
Dylan K. Taylor
2db79cf58d
Fix build
2021-10-05 18:41:47 +01:00
Dylan K. Taylor
7d06b76aaf
PluginManager: account for possible invalid format of API version
...
we're seeing a lot of crashes because of this.
2021-10-05 18:36:00 +01:00
Dylan K. Taylor
0ad663ff50
Merge remote-tracking branch 'origin/stable'
2021-10-05 01:17:59 +01:00
Dylan K. Taylor
a27c14c00c
phpstan: exclude build/php from analysis
...
in case I built PHP in there, I don't want the install_data getting analysed and screwing up the analysis.
2021-10-05 00:14:44 +00:00
Dylan K. Taylor
5b26abcb0e
NetworkSession: fixed code copy pasta
...
these are not, in fact, equivalent.
2021-10-05 01:02:15 +01:00
Dylan K. Taylor
f2d6059613
NetworkSession: Sync world spawn on world change
2021-10-04 22:51:31 +01:00
Dylan K. Taylor
bb6ea8cbdc
Do not call PlayerLoginEvent during the Player constructor
...
this closes a lot of loopholes in the login sequence that plugins were using to cause crashes.
2021-10-04 22:36:50 +01:00
Dylan K. Taylor
356a49d225
NetworkSession: account for possibility of syncGameMode() being called before the player is ready to receive it
...
close #4323
2021-10-04 22:13:42 +01:00