The example you gave at event.setFire(false)
is used in Event inside the Spigot API (Plugin programming). This solution is more eligible in terms of Vanilla.
First, create two dummy
-type scoreboard objectives. For this example, let's call them "A" and "C":
scoreboard objectives add A dummy
scoreboard objectives add C dummy
On a 20 Hz clock, run these commands in this order:
execute @e[score_A_min=0,type=FireBall] ~ ~ ~ summon ArmorStand ~ ~ ~ {DisplayName:"B", DisplayNameVisible:false}
scoreboard players set @e[type=FireBall,score_A=0] A 1
tp @e[type=ArmorStand,name=B,c=1] @e[score_A_min=1]
execute @e[type=FireBall] ~ ~ ~ scoreboard players set @e[type=ArmorStand,name=B,c=1,r=0] C 1
execute @e[type=ArmorStand,name=B,score_C=0] ~ ~ ~ fill ~-6 ~-6 ~-6 ~6 ~6 ~6 air 0 replace fire
kill @e[type=ArmorStand,name=B,score_C=0]
scoreboard players set @e[type=ArmorStand,name=B] C 0
To track down the FireBall's location, we summon an ArmorStand with no HitBox, and set his name to anything. For this answer, we'll call it "B" (Name will not be shown). After the summon, we set the FireBall's A score to 1, and will teleport the ArmorStand to it every tick.
Execute as the FireBall to set the closest ArmorStand's C score to 1.
Let's make any ArmorStand with 0 score of C to transform nearby fire to air, since that would mean that the FireBall is dead (exploded). Aftward, we kill the ArmorStand. In order to that work, we also will have to set all the ArmorStands to 0 at the end.