LogicUsing Events
Player Drop Item
Triggers when a player drops an item from their inventory.
This event fires when a player drops an item by pressing the drop key (default 'Q').
Action Values
Player: The player who dropped the item.Item Entity: The dropped item entity in the world. You can use this to modify the item (e.g., teleport it) or kill it to prevent it from being picked up.
Event Configuration
- Cancel Event: If
true, the item will not be dropped from the player's inventory.
Use Cases
- Making certain items (like quest items or essential tools) undroppable.
- Creating a "hot potato" game where dropping the potato triggers a penalty.
- Transmuting an item upon being dropped (e.g., drop a diamond to get a custom key).
Example: Making a Quest Compass Undroppable
- Create Custom Item: Create a custom item named
Quest Compass. - Region: Select your main gameplay region.
- Event: Add a
Player Drop Itemevent. - Actions:
- Add a
Conditionalaction. - Condition:
Has Item-> check if theItem Entity's item type is yourQuest Compass. - If Actions:
Cancel Event: Set totrue.Send Message: To thePlayer, saying&cYou cannot drop this important item!.
- Add a