HomeJavaModsThrowableFireballsPlus
ThrowableFireballsPlus
ModsJava

ThrowableFireballsPlus

by nandoothjuuh · on Modrinth

Add configurable, throwable fireballs to your Paper server. With per-player block damage control, PvP-friendly explosions, and full protection support.

Which build do you need?

This mod ships a separate file for every mod loader and every version of the game. Pick both, then download — the wrong build installs fine and then does nothing in the game.

Mod loader

Minecraft version

⬇ Download for 1.21–1.21.11 · Folia⬇ Download for 1.16.4–1.16.5 · Folia⬇ Download for 1.21–1.21.11 · Paper⬇ Download for 1.16.5 · Paper⬇ Download for 1.21–1.21.11 · Purpur⬇ Download for 1.16.5 · Purpur
I don't know my version or loader
Open the Minecraft launcher and look at the profile you play on — it names both, like fabric-loader-1.21.4. The version also shows in the bottom-right corner of the game's main menu.
No loader in the profile name? Then it's plain Minecraft, and these mods won't run — you need Fabric or NeoForge installed first.

ThrowableFireballs

A highly configurable Minecraft Paper plugin that allows players to throw fireballs as projectiles. Built with multi-version support (1.16.5 through latest Paper) and clean architecture to avoid NMS dependencies.

Features

Throwable Fireballs - Right-click with a fire charge (or custom item) to launch a fireball projectile
🎯 Configurable Damage - Separate control for block damage and entity damage
🛡️ Protection Integration - WorldGuard soft dependency with fallback protection
⏱️ Anti-Spam Cooldowns - Per-player cooldowns with action bar messages
🎨 Fully Customizable - Everything from item type to explosion power is configurable
👤 Per-Player Settings - Players can toggle block damage for their own fireballs
🔧 Multi-Version Support - Works on Paper 1.16.5+ without NMS
📦 Easy to Use - Simple commands and intuitive permissions system

Key Feature: Block Damage vs Entity Damage

IMPORTANT: This plugin allows you to disable block damage while keeping entity/player damage enabled. This means:

Configure this in config.yml:

explosion:
  block-damage: false  # Blocks are safe
  entity-damage: true  # Players still take damage

Players can also toggle block damage for their own fireballs:

/tfireballs blockdamage <on|off>

Installation

  1. Download the latest release JAR from the releases page
  2. Place the JAR file in your server's plugins/ folder
  3. Restart your server (or use a plugin manager)
  4. Configure the plugin in plugins/ThrowableFireballs/config.yml
  5. (Optional) Install WorldGuard for advanced region protection

Requirements

Commands

Command Description Permission
/tfireballs reload Reload configuration throwablefireballs.admin
/tfireballs give <player> [amount] Give fireball items throwablefireballs.admin
/tfireballs blockdamage <on|off> Toggle block damage for your fireballs throwablefireballs.blockdamage.toggle

Aliases: /tfb, /throwablefireball

Permissions

Main Permissions

Permission Description Default
throwablefireballs.* Grant all permissions op
throwablefireballs.use Throw fireballs true (everyone)
throwablefireballs.admin Access admin commands op

Advanced Permissions

Permission Description Default
throwablefireballs.bypasscooldown Bypass throw cooldown op
throwablefireballs.bypassprotection Bypass region protection op
throwablefireballs.blockdamage.toggle Toggle personal block damage true

Configuration

The config.yml file is extensively documented. Here are the key sections:

Item Settings

item:
  material: FIRE_CHARGE          # Item to throw
  consume-on-throw: true         # Consume item?
  consume-in-creative: false     # Consume in creative?
  custom-model-data:             # For resource packs
    enabled: false
    value: 0

Projectile Settings

projectile:
  type: SMALL                    # SMALL or LARGE
  speed: 1.5                     # Velocity multiplier

Explosion Settings

explosion:
  block-damage: false            # Break blocks?
  entity-damage: true            # Damage players/mobs?
  power: 1.0                     # Explosion radius
  create-fire: true              # Create fire?
  fire-ticks: 100                # Fire duration

Cooldown Settings

cooldown:
  time-millis: 1000              # 1 second cooldown
  show-actionbar: true           # Show message?

Protection Settings

protection:
  respect-worldguard: true       # Use WorldGuard?
  check-build-permission: true   # Basic protection

Per-Player Settings

per-player-settings:
  allow-block-damage-toggle: true  # Players can toggle?

All messages are customizable with color code support (& codes).

Multi-Version Support

This plugin is designed to work across multiple Paper versions (1.16.5+) without using NMS (Net Minecraft Server) code.

How It Works

The plugin uses a Version Adapter pattern:

  1. VersionAdapter Interface - Defines version-specific operations (e.g., action bar messages)
  2. ModernVersionAdapter - Uses Paper's Adventure API (1.16.5+)
  3. LegacyVersionAdapter - Reflection-based fallback for older versions

The plugin automatically detects your server version and uses the appropriate adapter.

API Version

In plugin.yml, we set api-version: 1.21 because:

Supported Versions

Version Status Notes
1.16.5 ✅ Compatible Minimum supported
1.17.x ✅ Compatible Uses modern adapter
1.18.x ✅ Compatible Uses modern adapter
1.19.x ✅ Compatible Uses modern adapter
1.20.x ✅ Compatible Uses modern adapter
1.21.x ✅ Tested Primary target
Future ✅ Should work No NMS dependencies

Building from Source

Prerequisites

Build Steps

# Clone the repository
git clone https://github.com/nando123412/ThrowableFireballs.git
cd ThrowableFireballs

# Build with Gradle
./gradlew build

# The JAR will be in build/libs/ThrowableFireballs-1.1.0.jar

Gradle Tasks

./gradlew clean          # Clean build directory
./gradlew build          # Build JAR (includes shadowJar)
./gradlew shadowJar      # Build shaded JAR with dependencies

How It Works

Throwing Fireballs

  1. Player right-clicks with a fire charge (or configured item)
  2. Plugin checks:
    • Permission (throwablefireballs.use)
    • Cooldown (unless bypassed)
    • Item validity (material, custom model data, display name)
    • Region protection (WorldGuard or basic checks)
  3. Fireball is spawned with:
    • Player's eye direction
    • Configured velocity
    • Tagged with PersistentDataContainer (player UUID stored)
  4. Item is consumed (if configured)
  5. Cooldown is applied

Explosion Control

When a fireball explodes:

  1. Plugin checks if it's tagged as "ours" (via PersistentDataContainer)
  2. If not tagged, explosion proceeds normally (vanilla behavior)
  3. If tagged:
    • Gets the player UUID from the tag
    • Checks per-player settings (if enabled)
    • Falls back to global config
    • Block Damage: If disabled, clears block list and sets yield to 0
    • Entity Damage: If disabled, cancels damage events
    • Fire: Applies fire ticks if configured

Critical Detail: Even when block-damage: false, the explosion event is NOT cancelled, so entity damage still occurs naturally through Bukkit's damage system.

Damage Handling

The plugin handles damage in two ways:

  1. Direct Hit - EntityDamageByEntityEvent with PROJECTILE cause

    • Applies custom damage if configured
    • Can be disabled with entity-damage: false
  2. Explosion Damage - Handled by Minecraft's explosion system

    • Works automatically when explosion is not cancelled
    • Controlled by entity-damage config option

Troubleshooting

Fireballs Don't Break Blocks

Solution: This is intentional if explosion.block-damage: false in config. Players still take damage.

Action Bar Messages Don't Show

Solution: The plugin uses Adventure API (Paper 1.16.5+). If using older Spigot, messages fall back to chat.

WorldGuard Integration Not Working

Solution: Ensure WorldGuard 7.0+ is installed and protection.respect-worldguard: true in config.

Players Can Spam Fireballs

Solution: Reduce cooldown.time-millis or ensure players don't have throwablefireballs.bypasscooldown permission.

Explosions Are Too Weak/Strong

Solution: Adjust explosion.power in config. Vanilla TNT is 4.0, Creeper is 3.0.

Performance

The plugin is designed to be lightweight and performant:

WorldGuard Integration

If WorldGuard is installed:

  1. Plugin detects WorldGuard on startup
  2. Basic region checks are performed
  3. Note: Full WorldGuard integration requires additional API usage
  4. Server admins can use WorldGuard flags to control fireball behavior:
    • creeper-explosion flag
    • ghast-fireball flag
    • Custom flags (requires WorldGuard configuration)

For now, the plugin respects basic WorldGuard presence and can be extended with full API integration.

Development

Project Structure

src/main/java/com/nandoothjuuh/throwablefireballs/
├── ThrowableFireballsPlugin.java       # Main plugin class
├── commands/
│   ├── TFireballsCommand.java          # Command executor
│   └── TFireballsTabCompleter.java     # Tab completion
├── compat/
│   ├── VersionAdapter.java             # Version adapter interface
│   ├── ModernVersionAdapter.java       # Adventure API (1.16.5+)
│   └── LegacyVersionAdapter.java       # Reflection fallback
├── config/
│   ├── ConfigManager.java              # Config wrapper
│   └── MessageManager.java             # Message handler
├── cooldown/
│   └── CooldownManager.java            # Cooldown tracking
├── items/
│   └── FireballItemFactory.java        # Item creation
├── listeners/
│   ├── ThrowListener.java              # Throw event handler
│   └── ExplosionControlListener.java   # Explosion control
└── util/
    └── TextUtil.java                   # Text utilities

Adding Features

To add new features:

  1. Add config options to config.yml and ConfigManager.java
  2. Add messages to config.yml and MessageManager.java
  3. Create new listeners or modify existing ones
  4. Register listeners in ThrowableFireballsPlugin.java
  5. Add permissions to plugin.yml
  6. Update README.md

License

This project is provided as-is for educational and server use. Feel free to modify and use it on your server.

Credits

Support

For issues, questions, or suggestions:


Note: This plugin is designed for Paper servers. While it may work on Spigot, Paper is highly recommended for best performance and compatibility.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more