7b1ae2a822
phpstan: green on level 3
2019-12-04 22:12:14 +00:00
8ecf5e02b9
bad fix for WritableBook phpstan warning
...
master has this shit so much better
2019-12-04 22:00:19 +00:00
39c607cbd5
Position: mark level field as nullable
...
allowing the level to be null is, to be honest, a big design flaw, but one that can't be fixed without BC breaks.
2019-12-04 21:31:35 +00:00
d867ffc60d
MetadataStore: fix some doc comments
2019-12-04 21:14:09 +00:00
c57eb26fd5
phpstan-bugs: add some extra patterns for level 3 false positives
2019-12-04 19:50:15 +00:00
c35d91a104
phpstan: allow blanket ignoreErrors in src to reduce merge work for master
2019-12-04 19:42:18 +00:00
9fc260fb1a
keep phpstan.neon.dist ignoreErrors sorted by file
2019-12-04 19:38:54 +00:00
73d0f799c2
Update to PHPStan 0.12.0
2019-12-04 10:29:49 +00:00
ecb2e6e3af
PluginManager: remove useless information from softDepend debug
...
we don't report the parameter type anywhere else, and since PHP doesn't support overloading, we don't need to.
This fixes PHPStan 0.12 complaints about ReflectionNamedType. I figured this was the best solution instead of adding an extra few lines of code.
2019-12-04 10:17:25 +00:00
7b75b6928d
AvailableCommandsPacket: fixed foreach docs
...
these probably aren't necessary at all to be honest.
2019-12-04 10:15:50 +00:00
753a8a6937
Event: remove useless @var $this annotations
...
we are not in a trait here, the scope is always Event.
2019-12-04 10:15:04 +00:00
bc76b1cafe
Server: remove several redundant @var annotations (copy pasta)
...
these are all useless because it is implied by the parameter type anyway.
2019-12-04 10:14:15 +00:00
00e415fc79
move phpstan.neon to phpstan.neon.dist to allow phpstan.neon to be locally modified for development
2019-12-03 19:57:19 +00:00
dbbe1f2d5c
Revert "Entity: remove redundant check from spawnTo()"
...
This reverts commit 3028832cd3
.
When I created this commit, I made the flawed assumption that spawnTo()
would not be used by plugins. In addition, I was not aware that there
are some usages of spawnTo() in the core which do not check for chunk
usage, such as in Player->showPlayer().
This caused a collection of problems including memory leaks and crashes
due to disconnecting players not removing their references from viewed
entities.
The reverted commit may be the cause of #3178 .
2019-12-03 10:41:13 +00:00
740f0a2314
crafting now works on 1.13, but it's not good
2019-12-02 21:50:52 +00:00
7fdfe947b0
inventory: fix some transactions being rejected for no good reason
...
since 1.13, transactions such as interacting with creative inventory cause a spoof windowID 124 slot 50 action to appear which changes air -> air. This currently gets rejected because only cursor is mapped to ID 124, and it only has a single slot.
It is not clear what the purpose of 124:50 is, but this fix filters out any actions which do not change anything, since they won't affect transaction balance anyway.
2019-12-02 21:41:08 +00:00
b7c4379700
StartGamePacket: fixed asymmetry in block table handling
2019-12-02 19:35:55 +00:00
20b7418916
PlayerAuthInputPacket: added encode & decode, and some aux classes
2019-12-02 15:14:59 +00:00
85521f5e7a
EducationSettingsPacket: added encode & decode
2019-12-02 13:57:19 +00:00
f37ea6a203
AvailableCommandsPacket: fix nonsensical placement of HARDCODED_ENUMS
2019-12-02 12:57:05 +00:00
abf8081ebc
RuntimeBlockMapping: add a type check for decoded NBT root type
...
this is kinda redundant since this function can blow up in so many other ways anyway, but it makes PHPStan happy, so it'll do.
2019-12-02 08:21:42 +00:00
8594cb3e74
AvailableCommandsPacket: fixed doc comment for putEnumConstraint()
2019-12-02 08:17:00 +00:00
d155de35ed
Merge branch 'dktapps-drew-1.13' into stable
2019-12-01 22:03:03 -05:00
e37c8e3a5d
Merge branch 'drew-1.13' of https://github.com/dktapps/PocketMine-MP into dktapps-drew-1.13
2019-12-01 22:02:40 -05:00
e38c0c0fe1
Merge remote-tracking branch 'upstream/stable' into stable
2019-12-01 21:55:50 -05:00
ce27c03774
PlayerChatEvent: fixed crash when non-CommandSender permissibles subscribe to broadcast permission
...
doing such a thing doesn't make any sense, but the system allows it, so it has to be accounted for.
2019-12-01 21:44:13 +00:00
c4a8781b5c
Fixed doc type inconsistencies surrounding chat broadcast handling (several problems that are all related)
2019-12-01 21:40:11 +00:00
dbab8b5733
Level: fixed type doc of tickRateTime field
2019-12-01 21:21:42 +00:00
2b08bbc7b1
Server: fixed type doc comment of nextTick field
2019-12-01 21:18:20 +00:00
17037f5e9c
Chunk: clean up nonsensical code in initChunk()
...
I have no idea why the extra check was there, or why the null assignment was used, because it doesn't make any sense.
2019-12-01 21:14:23 +00:00
fee3c17148
CraftingManager: fixed type doc of craftingDataCache field
2019-12-01 21:06:34 +00:00
25e6cb74b3
Squid: fixed type doc comment of swimDirection field
2019-12-01 21:06:03 +00:00
8d2e59222e
Entity: fixed not calculating surrounding blocks on entity creation
...
it's unclear if this was actually causing any bugs, but if it was it would likely manifest in the form of, for example, not burning in lava.
2019-12-01 21:05:36 +00:00
cd778661c2
Entity: fixed type doc comment for blocksAround field
2019-12-01 21:03:57 +00:00
c2afc05e7c
Entity: fix type doc comment for static knownEntities field
2019-12-01 21:03:29 +00:00
9be95bf263
Block: return [] instead of null in getMetadata() (return type is non-nullable)
2019-12-01 21:02:49 +00:00
4b65e1cbe1
Command: fix type doc comment for commandMap field
2019-12-01 21:01:57 +00:00
5caae37768
Server: fixed return type doc comment for getCommandAliases()
2019-12-01 21:00:49 +00:00
92e1811b06
DataPacket: fixed bad null assignment to buffer in clean()
...
this is never expected to be null, so implicitly relies on PHP magic behaviour to convert it to string when appended.
2019-12-01 20:36:56 +00:00
293c2710d0
PlayerCreationEvent: fixed doc comments for baseClass and playerClass fields
2019-12-01 20:19:59 +00:00
8a7017fd6b
Enchantment: fixed doc comment for static enchantments field
2019-12-01 20:16:45 +00:00
15f8886958
phpstan: separate non-PM bugs from the main neon config
...
everything left in here is now a PM problem that needs to be looked into.
2019-12-01 20:12:41 +00:00
3226a9dc6a
phpstan: ignore more optional-leveldb errors
2019-12-01 19:52:49 +00:00
1a1e3ff63b
BaseInventory: fixed incorrect & redundant default value for slots field
2019-12-01 19:45:16 +00:00
ea413d0882
phpstan: analyze on level 2, close #3193
2019-12-01 19:32:03 +00:00
0890b5fc99
AsyncPool: assert() that the unstacked task is actually an AsyncTask
...
it's possible that it might not be if the workers were accessed directly, but that shouldn't be possible.
This also silences a PHPStan warning on level 2.
2019-12-01 19:28:05 +00:00
163ed225f2
NetworkBinaryStream: fixed crash when non-compound root tag is provided for itemstack
2019-12-01 18:41:02 +00:00
a4a6d3e094
PlayerCreationEvent: fixed illegal doc comment types
2019-12-01 18:08:25 +00:00
ecbf3e9722
GamemodeCommand: fix CommandSender assignment causing troubles for type inference on static analyzers
...
this would never crash, but in strongly typed code it would be a compile failure.
2019-12-01 09:33:12 +00:00
47a959dace
block: fix some possible crashes when plugins overwrite tile classes in bad ways
...
phpstan was complaining on level 2, and it's not wrong to ...
2019-12-01 09:29:22 +00:00