mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2024-11-21 16:35:25 +00:00
c492352d50
[ci skip]
5.8 KiB
5.8 KiB
For Minecraft: Bedrock Edition 1.18.30
Note about API versions
Plugins which don't touch the protocol and compatible with any previous 4.x.y version will also run on these releases and do not need API bumps. Plugin developers should only update their required API to this version if you need the changes in this build.
WARNING: If your plugin uses the protocol, you're not shielded by API change constraints. You should consider using the mcpe-protocol
directive in plugin.yml
as a constraint if you do.
4.4.0-BETA1
Released 25th May 2022.
General
- The server will now shut itself down if any of the following errors occur during startup:
- Any plugin fails to load or enable (plugins loaded by other plugins post-startup are not affected by this change) (PR #4951)
- The motivation for this change is to prevent situations where plugins failing to load could result in adverse outcomes, such as a world protection plugin leaving a lobby unprotected from griefing.
- If you encounter this problem, remove the offending plugin(s) or prevent it from loading using
plugin_list.yml
. - See PR #4951 for more detail on this change.
- Any world mentioned in
server.properties
orpocketmine.yml
fails to load (worlds loaded by plugins are not affected by this change) - Any world mentioned in
server.properties
orpocketmine.yml
fails to generate (e.g. due to invalid generator settings)
- Any plugin fails to load or enable (plugins loaded by other plugins post-startup are not affected by this change) (PR #4951)
- Enabling the server whitelist while the server is running (e.g. using
/whitelist on
) will now kick any non-whitelisted players currently on the server (PR #4774). - Help for commands (
/help <name of command>
) now displays a list of aliases of that command. - A CRITICAL log message is now generated if a plugin disables itself when enabling, in case the plugin doesn't emit any error of its own.
- The
/give
command now shows the alias used to find the given item in the success message, instead of the item ID/meta.
Fixes
- Block placement has been fixed in many places where it previously didn't work correctly (PR #4886):
- torches on top of slabs, upside-down stairs
- torches on the back face of stairs
- flower pots on top of fences
- the list goes on and on ...
- Fixed backslash escapes not getting properly removed from commands in some cases.
- Fixed aliases defined in the
aliases
section ofpocketmine.yml
not being treated as quote-aware.
Gameplay
- Plants in flower pots can now be removed by right-clicking on the flower pot.
- Leaves now have a 2% chance of dropping sticks when destroyed by hand (PR #5019).
- Food exhaustion now matches Bedrock 1.18.30 (PR #5034).
- Implemented Stonecutter block (PR #4732).
API
Block
- Added
Block->getSupportType(Facing) : SupportType
(PR #4886).- This is used to determine the kind of support a block face can provide to a block (e.g. a torch) placed on it.
- Added
utils\SupportType
enum (PR #4886). tile\Spawnable->isDirty()
andtile\Spawnable->setDirty()
are now@deprecated
.
Command
- Added
CommandStringHelper::parseQuoteAware()
. This static method contains the code used bySimpleCommandMap
used to parse quoted command arguments.
Entity
- Added
Human::emote()
(PR #4610)
Event
PlayerCommandPreprocessEvent
is now@deprecated
, since its functionality is entirely replaced by other, general-purpose events.- Use
CommandEvent
to intercept commands. - Use
PlayerChatEvent
to intercept chat messages. - To convert a chat message into a command, pass it directly to
Server->dispatchCommand()
with the player as sender.
- Use
- Added
PlayerPostChunkSendEvent
(PR #4937). - Added
PlayerDeathEvent->setKeepXp()
(PR #4015). InventoryCloseEvent
is now called after the target window has been removed. This fixes various feedback loops caused by trying to open new windows to a player while there was one still active.- As a side effect, this now means that
Player->getCurrentWindow()
will returnnull
duringInventoryCloseEvent
. UseInventoryCloseEvent->getInventory()
instead.
- As a side effect, this now means that
Item
StringToItemParser
now recognizescod
,raw_cod
andcooked_cod
aliases.
Plugin
DisablePluginException
may now be thrown fromPlugin::onEnable()
to make the server gracefully disable the plugin (without crashing) (PR #4780).PluginManager->registerEvent()
now returns theRegisteredListener
created for the handler, to permit unregistering it later.
Internals
- Private property declarations now use typed properties (PHP 7.4) and promoted constructor properties (PHP 8.0) wherever possible.
- Protected and public properties remain unchanged, since they can't be changed without breaking subclasses.
- Promoted constructor properties are only used when it's consistently possible to promote most or all properties in a class.
- Simplified and improved legibility of
FormattedCommandAlias
. - Added unit tests for the quote-aware command parser used by
SimpleCommandMap
. - Various hardcoded values in
block
package classes have been moved to private constants to improve readability. - Added various constants used in the
LevelDB
world provider.