14474 Commits

Author SHA1 Message Date
Dylan K. Taylor
701a71a4ee
Sound::encode() position is no longer nullable
making this nullable was based on the invalid assumption that global sounds have no position, but it turns out they _do_ still use the position to make the sound come from the correct direction.
2021-10-23 02:01:26 +01:00
Dylan K. Taylor
e50072dc27
Clean PHPStan baselines 2021-10-23 01:55:10 +01:00
Dylan K. Taylor
c77829f4ad
Migrate packet creation to use ::create() methods in all but one case
MovePlayerPacket doesn't yet have a ::create() due to a complication with fields that aren't always present.
2021-10-23 01:46:01 +01:00
Dylan K. Taylor
c773e43eda
Updated BedrockProtocol to pmmp/BedrockProtocol@97fa88e9ef 2021-10-23 01:16:45 +01:00
Dylan K. Taylor
c262c2e726
Updated composer dependencies 2021-10-23 01:14:54 +01:00
Dylan K. Taylor
a4b65d6a3f
PlayerCreationEvent: verify that the class actually exists and is instantiable
this ensures that crashdumps blame the plugin instead of the core on bad classes, such as in this case: https://crash.pmmp.io/view/5331225
2021-10-21 20:37:45 +01:00
Dylan K. Taylor
986b4e0651
Enforce single-line PhpDoc for properties where possible 2021-10-21 20:32:37 +01:00
Dylan K. Taylor
2971bf30a5
actions: combine code verify into one step
this way the diff takes one less click to get to.
2021-10-21 00:30:19 +01:00
Dylan K. Taylor
4f2bcb61d6
Fixed crashdump generation when crashing before PluginManager was created 2021-10-20 23:35:04 +01:00
Dylan K. Taylor
e2275cc8ec
PluginManager: Prevent infinite recursion in loadPlugins()
if a plugin calls loadPlugins(server->getPluginPath()) during its onLoad(), and it itself is in that plugin path, an infinite recursion will occur.
2021-10-20 23:10:18 +01:00
Dylan K. Taylor
620874d902
PluginManager: Extract checkPluginLoadability() to a PluginLoadabilityChecker unit
this can be more easily unit-tested.
2021-10-20 22:31:56 +01:00
Dylan K. Taylor
44508a138f
Moved plugin extension requirement checks to PluginManager::checkPluginLoadability()
these don't really belong in PluginDescription.
2021-10-20 22:13:30 +01:00
Dylan K. Taylor
aa408c9a97
Fixed 9646128d0176240c818dcefa57d39fb46af0de07 2021-10-20 21:54:57 +01:00
Dylan K. Taylor
6d78a0b435
CS 2021-10-20 21:52:42 +01:00
Dylan K. Taylor
76b4b23d98
PluginManager: remove loadPlugin()
loadPlugins() is now the preferred option, since it does all the proper checks.
In addition, the server now acknowledges that loading a single plugin may cause multiple plugins to be loaded, so returning only a single Plugin is not representative of what's actually happening.
2021-10-20 21:52:19 +01:00
Dylan K. Taylor
03fcd844eb
PluginManager::loadPlugins() now accepts files as well as directories
loadPlugins() is now a superior option to loadPlugin(), since it enforces dependency checks and also supports automatic loading of plugins when new loaders are installed.
2021-10-20 21:36:14 +01:00
Dylan K. Taylor
fecc13f362
Merge branch 'master' of github.com:pmmp/PocketMine-MP 2021-10-20 21:23:14 +01:00
Dylan K. Taylor
9646128d01
Updated resources/locale submodule to pmmp/Language@09c709f242 2021-10-20 21:22:56 +01:00
Dylan T
a788954551
Fixed dependency handling across plugin loaders (#3971) 2021-10-20 20:22:00 +01:00
Dylan K. Taylor
dc07ac33d3
protocol: fixed missing field of CraftRecipeAuto 2021-10-20 19:47:32 +01:00
Dylan K. Taylor
ec3986827c
Update BedrockProtocol to 3.0.1, widen constraint to allow newer patch versions 2021-10-20 16:20:10 +01:00
Dylan K. Taylor
09c840b66a
Update transient composer dependencies 2021-10-20 16:19:20 +01:00
Dylan K. Taylor
80b402e529
ItemTranslator: throw the proper exceptions when failing to map network IDs 2021-10-20 14:01:39 +01:00
Dylan K. Taylor
a3f8546ac4
4.0.0-BETA7 is next 2021-10-19 19:13:43 +01:00
Dylan K. Taylor
46920818b5
Release 4.0.0-BETA6 4.0.0-BETA6 2021-10-19 19:13:43 +01:00
Dylan K. Taylor
69cb575789
Merge branch 'stable' 2021-10-19 19:05:25 +01:00
Dylan K. Taylor
fee6478cbe
Updated BedrockData and BedrockProtocol for 1.17.40 support 2021-10-19 19:00:29 +01:00
Dylan K. Taylor
9c5cec77b1
3.25.1 is next 2021-10-19 18:27:30 +01:00
Dylan K. Taylor
f48b703533
Release 3.25.0 3.25.0 2021-10-19 18:27:26 +01:00
Dylan K. Taylor
70636f6eb4
Protocol changes for 1.17.40 2021-10-19 18:00:34 +01:00
Dylan K. Taylor
c70b80c273
ItemEntity: implement partial itemstack pickups in the dumbest way possible
Given the various limitations and flexibilities posed by EntityItemPickupEvent, I settled on this as the simplest way to deal with the problem.

- EntityItemPickupEvent may have its destination inventory changed, so we can't cache the result of getAddableItemQuantity() to use after the event.
- The item itself may have changed, so even if we thought we could add some items before the change, we might not be able to afterwards.

Considering the above facts, it's better to just give the whole itemstack to EntityItemPickupEvent, and let plugins use getAddableItemQuantity() on their own to decide if their chosen inventory can accommodate the item or not.
If it can't, then we'll just drop it on the ground.
This also fixes a potential issue where plugins changing the item to a custom one might end up with their items and the actual items both just vanishing if the target inventory was full.
closes #4499
2021-10-17 22:37:49 +01:00
Dylan K. Taylor
a794d24c81
Added a tool to generate a Markdown document of all core permissions 2021-10-17 17:02:18 +01:00
Dylan K. Taylor
8db5732b44
Drop respect/validation
it's not worth this turning into compatibility baggage just so that we can parse plugin_list.yml, especially when we have new ways to handle data parsing coming in the pipeline.
For something as small as plugin_list.yml, it's easier (and in this case better too) to just validate it manually (respect/validation was anyway too strict considering it's YAML we're dealing with).
2021-10-15 17:15:46 +01:00
Dylan K. Taylor
48f809d3fa
Removed another dead PHPStan error pattern
this was actually a PHPStan bug fixed in 0.12.99.
2021-10-15 17:01:09 +01:00
Dylan K. Taylor
0348236860
fucking CS again 2021-10-14 15:56:50 +01:00
Dylan K. Taylor
8c07748100
RakLibInterface: print packet exception info as a block using Utils::printableExceptionInfo() 2021-10-14 15:55:08 +01:00
Dylan K. Taylor
06e7338ff9
Move exception printing utilities from MainLogger to Utils
where they can be useful to other stuff apart from just the logger
2021-10-14 15:54:20 +01:00
Dylan K. Taylor
bdbfa70558
Server: break some isolated stuff out of Server::__construct() 2021-10-14 15:44:18 +01:00
Dylan K. Taylor
7a4af7a0bc
SignalHandler: fix CS
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2021-10-14 15:14:27 +01:00
Dylan K. Taylor
34b1392598
Cross-platform signal handler 2021-10-14 15:03:11 +01:00
Dylan K. Taylor
321345fcc8
Sapling: simplify condition 2021-10-13 23:00:38 +01:00
Dylan K. Taylor
0ac9f4fe61
BlockFactory: move SweetBerryBush to its proper place 2021-10-13 22:26:51 +01:00
Dylan K. Taylor
2db53775e0
Sort item_from_string_bc_map using SORT_NATURAL 2021-10-13 21:01:59 +01:00
Dylan K. Taylor
8523f0fb0b
CS fix 2021-10-13 20:31:24 +01:00
Dylan K. Taylor
b570324288
LegacyStringToItemParser: rely exclusively on item_from_string_bc_map.json, do not interpret integers given as strings
fixes #4507
2021-10-13 20:29:18 +01:00
Dylan K. Taylor
6284cd14c7
LegacyStringToItemParser: added getMappings() 2021-10-13 20:19:44 +01:00
Dylan K. Taylor
ce8af4e3bc
4.0.0-BETA6 is next 2021-10-13 00:02:01 +01:00
Dylan K. Taylor
b65e89b605
Release 4.0.0-BETA5 4.0.0-BETA5 2021-10-13 00:01:56 +01:00
Dylan K. Taylor
d3f74d6ce1
Merge branch 'stable' 2021-10-12 23:32:43 +01:00
Dylan K. Taylor
bbd925abc4
Merge commit '974d08efd62c52c1c8ac92cb1b67ac157908fd71' 2021-10-12 23:31:50 +01:00