Hello, I am having an issue trying locate the cause of a block modification.
@Listener
public void onInteract(InteractBlockEvent event, @First Player player) {
event.getTargetBlock().getLocation().get().setBlockType(BlockTypes.SOUL_SAND);
}
@Listener
public void onBlockModify(ChangeBlockEvent event) {
event.getCause().all().forEach(c -> {
System.out.println(c); // Line being referenced
});
System.out.println("+-----+");
}
Whenever I right-click a block, you would think that the ChangeBlockEvent listener would print out a cause that says a plugin modified the block. Instead it only lists that a I (the player) modified the block. Is there any way that I can get the cause to show my plugin as what modified the block?