utarwyn / EnderContainers

A modern and customizable Bukkit plugin to divide enderchest into multiple inventories.
https://spigotmc.org/resources/4750/
BSD 3-Clause "New" or "Revised" License
25 stars 14 forks source link

Can open enderchest even if PlayerInteractEvent is canceled, any way to solve? #196

Closed afoxxvi closed 2 years ago

afoxxvi commented 2 years ago

I have a plugin that may cancel PlayerInteract Event, however enderchest was still opened. I don't want player can open enderchest even if I canceled the interact event because I have something else to do.

utarwyn commented 2 years ago

Hello! As you can see in the code below, I do not check if the event has already been cancelled. I forgot to handle this case, I'll change that. Thanks for the feedback!

https://github.com/utarwyn/EnderContainers/blob/1539b19a14b7f656480c4ddce933a006a87e7ac7/plugin/src/main/java/fr/utarwyn/endercontainers/enderchest/listener/EnderChestListener.java#L53-L57

afoxxvi commented 2 years ago

OK, thanks a lot!