 
                Shootable Fireballs
Modification Overview
The Shootable Fireballs modification enables players to launch fireballs using Fire Charges. Every aspect of the launched projectile is subject to fine-tuning: flight speed, explosion radius and power, damage dealt, and the ability to break blocks. To maintain server performance, an automatic explosion feature is implemented for balls after a set time if they haven't hit anything, thereby eliminating lag caused by uselessly floating objects in the world.
All configuration is possible both through the standard configuration file config.yml and by using in-game commands, making the plugin convenient for both administrators and regular players.
Key Features
- Launching Fireballs: Right-click with a Fire Charge in hand to launch a fire projectile.
- Explosion on Impact: Collision with an object or block results in a powerful explosion.
- Customizable "Lifespan": Balls automatically explode after flying for a set time, protecting the server from overload.
- Customizable Damage: You can specify how much damage the explosion will deal to entities in the affected area.
- Block Breaking: Determines whether explosions can destroy blocks or not.
- Speed and Power Customization: Easily adjust both the flight speed of the ball and the destructive power of the explosion itself.
Configuration via config.yml
The file must be located in the modification's root directory.
config.yml
fireball:
  # Fireball flight speed (1.0 corresponds to normal speed)
  speed: 1.0
  # Explosion radius in blocks
  explosion_radius: 3
  # Explosion power (the higher the value — the stronger the effect)
  explosion_strength: 4
  # Whether explosions can break blocks (true — yes, false — no)
  can_break_blocks: true
  # Damage dealt by the explosion to other entities (players, mobs; 0 corresponds to no damage)
  damage: 10
  # "Cooldown" time between shots in seconds (not implemented in the current version)
  cooldown: 0.5
  # Ball lifespan in seconds before automatic explosion if it hasn't hit anything
  lifespan: 30Configuration Options
- speed: Fireball flight speed (normal speed at value- 1.0).
- explosion_radius: Determines how many blocks will be affected by the explosion.
- explosion_strength: Affects the degree of visual and physical effects of the explosion — the higher the value, the stronger the blast and the greater the object throw.
- can_break_blocks: Allows specifying whether explosions will damage the landscape or leave it intact.
- damage: Damage dealt to entities at the epicenter of the explosion or nearby.
- cooldown: Time interval between shots, to be implemented in future mod versions.
- lifespan: A ball that hasn't collided with an obstacle will automatically explode after a certain number of seconds.
In-Game Commands
For flexible configuration directly during gameplay, use the /fireballconfig command.
Command Syntax
/fireballconfig <parameter> <value>
Where <parameter> is the parameter to be configured (e.g., speed, radius, damage, lifespan), and <value> is the new numerical or boolean value for the corresponding parameter.
Usage Examples
- Set fireball flight speed to 2.0: /fireballconfig speed 2.0
- Expand explosion radius to 5 blocks: /fireballconfig radius 5
- Set the amount of damage to entities: /fireballconfig damage 20
- Determine the projectile's "lifespan" equal to 1 minute: /fireballconfig lifespan 60
Usage Scenarios
- Attacking Mobs: A player launches a ball at an approaching Creeper, an explosion occurs on impact, dealing area damage or killing the opponent (damage is configurable).
- Creating Obstacles: The blast wave can destroy barriers made of dirt or stone if enabled in the plugin settings.
- High-altitude Shot: By launching a ball into the sky without aiming at any objects, you get an auto-explosion after the set time and a particle burst visible from afar.
Installation
- Download the file with the .jarextension.
- Move the .jar file to the server's pluginsfolder.
- Reload the server to fully initialize the plugin.
- For initial setup, edit the parameter values in the config.ymlfile located in the folder of this modification.
- You can now launch fireballs and quickly reconfigure their behavior as needed.
 
                                