looks like the drops are added here: https://github.com/Charles445/SimpleDifficulty/blob/828a7749c27c60cfd81e4f68f9bf9f8eca46bec3/src/main/java/com/charles445/simpledifficulty/handler/BlockHandler.java#L44
so maybe you could to something like:
@SubscribeEvent(priority = EventPriority.LOW)
static void handleMagma(@Nonnull final BlockEvent.HarvestDropsEvent event) {
event.getDrops().removeIf(stack -> stack.getItem() == SDItems.magma_chunk && !isValidTool(event.getHarvester().getHeldItemMainhand()));
}
static boolean isValidTool(@Nonnull final ItemStack tool) {
...
}