Nukkit icon indicating copy to clipboard operation
Nukkit copied to clipboard

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

Open BaekMu opened this issue 2 years ago • 1 comments

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

  • Debug link:
  • Timings link (if relevant):

Crashdump, Backtrace or Other Files

https://imgur.com/a/hIKzRiT

Checklist:

  • [] I included a /debugpaste link
  • [X] I made sure there aren't duplicates of this report (Use Search)
  • [X] I made sure I am using an up-to-date version of Nukkit (https://ci.opencollab.dev/job/NukkitX/job/Nukkit/job/master/966)
  • [X] I Made sure the bug/error is not caused by a plugin

BaekMu avatar Apr 21 '22 11:04 BaekMu

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

PetteriM1 avatar Apr 21 '22 11:04 PetteriM1