CloudburstMC / Nukkit

Cloudburst Nukkit - Nuclear-Powered Minecraft: Bedrock Edition Server Software
https://cloudburstmc.org
GNU General Public License v3.0
1.21k stars 420 forks source link

PlayerInteractEvent "event.setCancelled" doesn't cancel door open/close event) #1977

Open kaniteru opened 2 years ago

kaniteru commented 2 years ago

Expected Behavior

When you do a event.setCancelled(), Door opening and closing events should be canceled when right-clicking on any part of the door.

Actual Behavior

If you right-click the upper part of the door, the event is not canceled. but, if you right-click at the bottom of the door, the event is canceled normally.

Steps to Reproduce

  1. Create a PlayerInteractEvent Listener.
  2. Do a event.setCancelled() anywhere in the event.
  3. Right-click the upper part of the door to open or close it.

Debug information

Crashdump, Backtrace or Other Files

https://imgur.com/a/hIKzRiT

Checklist:

PetteriM1 commented 2 years ago

Correction: it does cancel the event but doesn't send a block update to undo it client side

https://github.com/CloudburstMC/Nukkit/pull/1615