MultiBlockInteractEvent setCancelled not work
andris155 opened this issue ยท 2 comments
๐ Description (REQUIRED)
The MultiBlockInteractEvent setCancelled not work.
I try disable the MultiBlock machines in creative mode, but the e.setCancelled(true) not working. The multiblock machines still works.
๐ Steps to reproduce the Issue (REQUIRED)
Use the MultiBlockInteractEvent api and setup the e.setCancelled(true).
๐ก Expected behavior (REQUIRED)
MultiBlockInteractEvent setCancelled(true) works, and if true, the multiblocks machines no usable.
๐ Server Log
๐ /error-reports/ Folder
๐งญ Environment (REQUIRED)
Yatopia git-Yatopia-"f8c5c21" (MC: 1.16.5)
Slimefun DEV - 812 (git 47743b6)
Metrics-Module #21
Java 11
Installed Addons: (2)
RestrictedCreative v2.4.6
SlimefunFix v1.1-SNAPSHOT
The event is named interact rather then use so I understand why it may not block usage.
However, it is a cancellable event so it isn't doing what it should regardless.
The interact handler is currently firing before the event and event result is ignored.
Ref: https://github.com/Slimefun/Slimefun4/blob/master/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/MultiBlockListener.java#L65-L66
This event name indicates it's pre really and since it's cancellable it should do something.