Pressure plate ChangeBlockEvent cancelling, and.. huge stacktrace

We are developing a vanish plugin and have faced a problem with pressure plates
When I canncelled the ChangeBlockEvent for pressure plate, a huge stacktrace (1000+ lines, but I cut repeating parts) appears in the server’s console.
@Listener public void onChangeBlock(ChangeBlockEvent event, @Root Player player){ if (VanishManager.canInteract(player)) return; // False in my case event.setCancelled(true); }
Pressure plate is not pressed, the redstone lamp does not turn on, however the redstone wire (length is 1 block) between the lamp and plate is active.

I don’t know why that SOE occurs, but for pressure-plates i’d suggest anyway to cancel the CollideBlockEvent instead.
That should be more suitable for this use case. :slight_smile:

1 Like