Shootable Fireballs

Shootable Fireballs

Plugin

Makes Fireballs Shootable

Server AdventureMagic

103 downloads
1 follower
Follow Save
90% of ad revenue goes to creators. Go ad-free while supporting creators with Modrinth Plus. Subscribe today!

Shootable Fireballs

Description

The Shootable Fireballs plugin allows players to shoot fireballs using Fire Charges. The fireballs can be customized in terms of speed, explosion radius, strength, and damage. Additionally, the plugin supports a lifespan feature, meaning fireballs will automatically explode if they don't hit anything after a specified period of time, preventing them from lingering in the world and causing lag.

Players can also configure the behavior of the fireballs directly through the config.yml file or via in-game commands.


Features

  • Shoot Fireballs: Right-click with a fire charge to shoot a fireball.
  • Explosion on Impact: Fireballs explode when they hit an entity or block.
  • Configurable Lifespan: Set the lifespan of fireballs to avoid performance issues due to lingering fireballs.
  • Configurable Damage: Adjust the damage done by fireball explosions to entities.
  • Block Breaking: Configure whether fireballs can break blocks on explosion.
  • Speed and Strength Customization: Control the speed of fireballs and the strength of their explosions.

Configuration

The plugin allows customization via the config.yml file. This file should be placed in the plugin’s main directory.

config.yml

fireball:
  # Speed of the fireball (1.0 is normal speed)
  speed: 1.0

  # Explosion radius (blocks affected)
  explosion_radius: 3

  # Explosion strength (higher = bigger explosion)
  explosion_strength: 4

  # Whether fireballs can break blocks (true/false)
  can_break_blocks: true

  # Damage dealt by the fireball explosion to entities (0 = no damage)
  damage: 10

  # Cooldown in seconds between shots (not implemented here)
  cooldown: 0.5

  # Lifespan of fireballs in seconds before they explode if they haven't hit anything
  lifespan: 30

Configuration Options

  • speed: Controls how fast the fireball moves. Default value is 1.0 (normal speed).

  • explosion_radius: The radius (in blocks) affected by the explosion. Default value is 3 blocks.

  • explosion_strength: Determines the strength of the explosion. The higher the value, the stronger the explosion. Default value is 4.

  • can_break_blocks: If set to true, the fireball explosion will break blocks. Set to false to prevent block destruction. Default is true.

  • damage: The amount of damage the fireball explosion deals to entities (players, mobs, etc.) within the explosion radius. Set to 0 for no damage. Default is 10.

  • cooldown: Specifies the cooldown time (in seconds) between consecutive fireball shots. Not implemented in the current version of the plugin but can be added in future versions. Default value is 0.5 seconds.

  • lifespan: The lifespan (in seconds) of the fireball. If the fireball does not hit anything within this time, it will explode automatically. Set to 30 seconds by default.


In-Game Commands

You can use the /fireballconfig command to adjust the plugin's settings directly in the game.

Command Syntax

/fireballconfig <setting> <value>

  • <setting>: The setting you want to adjust (e.g., speed, radius, damage, lifespan, etc.).
  • <value>: The new value for the setting (e.g., a number for speed, damage, etc., or true/false for boolean settings like can_break_blocks).

Example Commands

  • /fireballconfig speed 2.0 - Sets the fireball speed to 2.0.
  • /fireballconfig radius 5 - Sets the explosion radius to 5 blocks.
  • /fireballconfig damage 20 - Sets the explosion damage to 20.
  • /fireballconfig lifespan 60 - Sets the fireball lifespan to 60 seconds.

Usage

  1. Shoot Fireballs: To shoot a fireball, simply right-click with a Fire Charge in your hand.

  2. Explosion on Impact: The fireball will explode on impact with any block or entity. The explosion behavior is customizable via the config.yml file (e.g., explosion radius, strength, block breaking, and damage).

  3. Automatic Explosion After Timeout: If a fireball does not hit anything within the configured lifespan (default is 30 seconds), it will explode automatically to prevent it from lingering in the world.


Example Use Case

  1. A player shoots a fireball at a mob, and it explodes on impact, causing damage to the mob.
  2. If the player shoots the fireball into the air and it doesn’t hit anything, it will automatically explode after 30 seconds (or whatever lifespan is configured).
  3. The explosion can break blocks if configured to do so, and it will deal damage to any nearby entities (mobs or players).

Installation

  1. Download the Shootable Fireballs plugin .jar file.
  2. Place the .jar file in the plugins folder of your server.
  3. Restart the server to enable the plugin.
  4. Customize the plugin settings by editing the config.yml file (located in the plugin's folder).
  5. Use the /fireballconfig command to adjust settings in-game if needed.

Project members

InventoStarz

Member

Details

Licensed ARR
Published 4 months ago
Updated 14 days ago