Rush2929 eb9188c309
Replace InventoryPickup*Event with EntityItemPickupEvent (#4384)
The rationale here is that inventories don't actually pick items up - their holders do.
It's especially misleading to say that an inventory is picking up an item in creative mode when the picked-up item can't actually be added to the target inventory in the first place.

This change allows a range of new functionality, such as:
- Allowing survival players to pick items up even when their inventories are full, similarly to creative players
- Changing the destination inventory of collected items (e.g. items could be redirected to the offhand or ender chest inventory, while still allowing other plugins to understand what's happening)

As an added bonus, this obsoletes one more use case for Inventory->getHolder(), bringing us one step closer to removing the cyclic reference nightmare from inventories.

The choice of naming (EntityItemPickup, instead of EntityPickupItem) is to be consistent with other events, where the word order is SubjectObjectActionEvent.
2021-08-20 22:59:35 +01:00
2021-08-19 15:39:16 +01:00
2021-08-19 15:40:43 +01:00
2021-08-19 15:39:16 +01:00
2017-06-25 14:15:34 +01:00
2020-08-10 17:55:49 +01:00
2021-08-19 15:39:16 +01:00
2021-08-19 15:39:16 +01:00
2012-12-07 02:24:55 +01:00
2020-08-29 23:40:47 +01:00
2020-04-30 17:34:13 +01:00


A highly customisable, open source server software for Minecraft: Bedrock Edition written in PHP

CI GitHub tag (latest semver) Docker image version (latest semver) Discord

Getting started

Discussion/Help

For developers

Donate

  • Bitcoin Cash (BCH): qq3r46hn6ljnhnqnfwxt5pg3g447eq9jhvw5ddfear
  • Bitcoin (BTC): 171u8K9e4FtU6j3e5sqNoxKUgEw9qWQdRV
  • Stellar Lumens (XLM): GAAC5WZ33HCTE3BFJFZJXONMEIBNHFLBXM2HJVAZHXXPYA3HP5XPPS7T
  • Patreon

Licensing information

This project is licensed under LGPL-3.0. Please see the LICENSE file for details.

pmmp/PocketMine are not affiliated with Mojang. All brands and trademarks belong to their respective owners. PocketMine-MP is not a Mojang-approved software, nor is it associated with Mojang.

Languages
PHP 99.9%