The "minecraft:player_destroyed_block" fires only whenever a player breaks a block in survival mode. This should also fire when a player breaks a block in creative mode.
What was expected to happen:
The event should have fired normally even if the player who destroyed the block was in creative mode
What happens:
The event doesn't get fired for players breaking blocks in creative mode
Steps to Reproduce:
1. Get the behavior pack attached or use the following script:
const system = server.registerSystem(0, 0);
system.initialize = function() {
system.listenForEvent("minecraft:player_destroyed_block", (eventData) => breakBlock(eventData))
}
function breakBlock(eventData) {
let chatEventData = system.createEventData("minecraft:display_chat_event");
chatEventData.data.message = "Player destroyed block!";
system.broadcastEvent("minecraft:display_chat_event", chatEventData)
}
2. Enter a world with the aforementioned script (don't forget to enable Experimental Gameplay!)
3. Break a block in survival and later in creative
4. A chat message will get sent if we are in survival mode. This is however not the case if we are in creative mode.
Thank you for your report!
We're actually already tracking this issue at MCPE-55948, so I resolved and linked this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki