10575 Commits

Author SHA1 Message Date
Dylan K. Taylor
889cd5e206 PlayerNetworkSessionAdapter: clean up leftovers from multi quote support for json decode 2020-02-05 20:45:13 +00:00
Dylan K. Taylor
e1ddf90695 Chunk: remove useless instanceof checks
these are always CompoundTags, and if they aren't we have a bug somewhere else.
2020-02-05 20:44:27 +00:00
Dylan K. Taylor
2f325b8c91 Permission: loadPermission() never returns null 2020-02-05 20:43:40 +00:00
Dylan K. Taylor
ac4f00be81 PluginManager: combine conditions into something less useless
the left side was already implying that the var is a Plugin instance, but PHPStan doesn't like non-bool conditions in strict mode.
2020-02-05 20:42:40 +00:00
Dylan K. Taylor
914450c30b Entity: remove useless assert()
namedtag is always non-null here, and if it isn't, it should just catch fire the normal way.
2020-02-05 20:40:34 +00:00
Dylan K. Taylor
25554f0d61 Level: remove useless code from unload() 2020-02-05 20:39:38 +00:00
Dylan K. Taylor
e1a61cb51a BaseLang: get() never returns null 2020-02-05 20:38:45 +00:00
Dylan K. Taylor
fe5620f097 ThreadManager: Lazy-init during getInstance() 2020-02-05 20:36:44 +00:00
Dylan K. Taylor
faef4e8736 SimpleCommandMap: Command->getLabel() never returns null 2020-02-05 20:33:27 +00:00
Dylan K. Taylor
0d19f6c968 Server: initialize auto updater before loading plugins, not after
from a plugin PoV, getUpdater() is always supposed to return an AutoUpdater instance, but it would return null during onLoad(), which is bad.
2020-02-05 20:32:51 +00:00
Dylan K. Taylor
ecf662bf74 Server: Lazy-init static sleeper as-needed
this makes it testable without a server context.
2020-02-05 20:31:01 +00:00
Dylan K. Taylor
8cba2e0346 Server: fixed wrong non-nullability of queryHandler 2020-02-05 19:56:16 +00:00
Dylan K. Taylor
dfc8a6ffdd Player: remove useless code from save() 2020-02-05 19:54:50 +00:00
Dylan K. Taylor
262728b091 PopulationTask: clean up overcomplicated garbage 2020-02-05 18:31:51 +00:00
Dylan K. Taylor
df8e0cf1f5 MemoryManager: eliminate unnecessary reference abuse in continueDump()
this makes the flow of data easier to understand, and also sidesteps some PHPStan bugs.
2020-02-05 17:06:05 +00:00
Dylan K. Taylor
ad87c11ae1 ThreadManager: use array-access instead of variable property access 2020-02-05 16:36:11 +00:00
Dylan K. Taylor
fa82cb26d8 added native types to closures (phpstan-strict-rules) 2020-02-05 16:35:10 +00:00
Dylan K. Taylor
e5a2cfb65f avoid type juggling in conditions, always use explicit boolean conditions 2020-02-05 15:44:06 +00:00
Dylan K. Taylor
b96bb7d824 Player: use strict base64_decode() for login decoding
though, perhaps we should beware of false returns?
2020-02-05 13:55:38 +00:00
Dylan K. Taylor
59cf8e95f0 Tree: fixed populator not growing trees any lower than y=2
this would only be a problem for custom generators, but nonetheless...
2020-02-05 13:17:09 +00:00
Dylan K. Taylor
99038c752c Avoid usage of for-loop vars outside of for-loop context
these problems were reported by PHPStan strict rules. They aren't actually bugs, but they could become bugs in the future.
2020-02-05 13:16:09 +00:00
Dylan K. Taylor
88afedd1e8 Human: avoid overwriting non-foreach vars in foreach 2020-02-05 12:59:59 +00:00
Dylan K. Taylor
c43e21235d HelpCommand: do not overwrite non-foreach vars in foreach 2020-02-05 12:57:27 +00:00
Dylan K. Taylor
3f7e7352fb added SplFixedArray generics for phpstan 0.12.9 2020-02-05 11:57:37 +00:00
Dylan K. Taylor
e1eb9186fe Merge branch 'stable' 2020-02-03 19:57:21 +00:00
Dylan K. Taylor
32d6ea0fba Chest: do not crash on failure to fetch pair, closes #2701
isPaired() returning true is not semantically equivalent to getPair() returning non-null. getPair() might return null if the pair is inaccessible, such as when it's in an unloaded chunk (it doesn't check this yet, but it should).
For the sake of opening inventory, we don't care if the chest believes if it is paired, we care if there is actually a pair to be accessed for inventory viewing.
In addition, it's possible to create this broken-data scenario artificially by close()ing a chest tile without unpairing it first, because a tile doesn't know the difference between being closed due to unload and being destroyed.
2020-02-03 19:32:58 +00:00
Dylan K. Taylor
28c787371a Server::$rcon may be null (disabled or failed to start) 2020-02-03 19:25:56 +00:00
Dylan K. Taylor
dba14c9f08 PharPluginLoader: remove useless instanceof, offset is always PharFileInfo at this point 2020-02-03 12:35:34 +00:00
Dylan K. Taylor
eba8d77034 3.11.6 is next 2020-02-02 18:31:51 +00:00
Dylan K. Taylor
13e4772f98 Release 3.11.5 2020-02-02 18:31:51 +00:00
Dylan K. Taylor
d48597ec5d move BedrockData submodule to resources/ 2020-02-01 22:14:24 +00:00
Dylan K. Taylor
aad1a3400f Merge branch 'submodule-conflict-stable' into submodule-conflict-master 2020-02-01 22:13:43 +00:00
Dylan K. Taylor
496732999c reintroduce BedrockData submodule 2020-02-01 22:05:07 +00:00
Dylan K. Taylor
6a8105f5a0 delete BedrockData submodule 2020-02-01 22:01:22 +00:00
Dylan K. Taylor
e3833ba4f0 Merge branch 'stable' 2020-02-01 21:03:21 +00:00
Dylan K. Taylor
54604398f2 Merge commit 'f1083bd9c402c1456f4fc7dce8271c33360dc227' 2020-02-01 20:54:54 +00:00
Dylan K. Taylor
356ed5f1de DyeColor: fix PHP 7.2 compatibility 2020-02-01 20:50:16 +00: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
cc33c8155f Language: specify key type for lang and fallbackLang fields 2020-02-01 20:20:39 +00:00
Dylan K. Taylor
ff63f6d055 fill in more iterable types (master) 2020-02-01 20:19:57 +00:00
Dylan K. Taylor
0a566f8218 LevelProvider::generate() accepts class-string<Generator>, not any
string
2020-02-01 20:16:05 +00:00
Dylan K. Taylor
829dd02eea Server: fixed more bad non-nullable phpdocs 2020-02-01 19:30:47 +00:00
Dylan K. Taylor
200209b76c RegistryTrait: provide an explicit phpstan type for __callStatic arguments 2020-02-01 17:20:36 +00:00
Dylan K. Taylor
89c6da13ac phpstan: use more class-string 2020-01-31 22:05:33 +00:00
Dylan K. Taylor
f65bf76fd8 Merge commit '799183e13e61e89cc6820ad3132a4147454017c6'
# Conflicts:
#	resources/vanilla
#	src/Server.php
#	src/pocketmine/entity/Entity.php
#	src/pocketmine/level/format/io/LevelProviderManager.php
#	src/pocketmine/tile/Tile.php
#	src/world/generator/GeneratorManager.php
2020-01-31 21:26:40 +00: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
96ac95798b Merge commit '4ff4434a220813e446efde4a38e48a0416476dba'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/item/Banner.php
#	src/pocketmine/item/Item.php
2020-01-31 20:11:29 +00:00
Dylan K. Taylor
ee4757303b Merge commit '9eebfa7cc30c8a5ac39f192c79023131623ad4b4'
# Conflicts:
#	resources/vanilla
#	src/Server.php
#	src/pocketmine/Achievement.php
2020-01-31 20:07:21 +00:00
Dylan K. Taylor
721bd8f02b Merge commit 'd3021c628134293c2b8af505806efc2fba4fe947'
# Conflicts:
#	resources/vanilla
2020-01-31 20:03:27 +00:00
Dylan K. Taylor
3401504bab Merge commit '9097d6c4d35b05576181f91bda68d316809f28b9'
# Conflicts:
#	resources/vanilla
2020-01-31 20:02:59 +00:00