zd_shardks

Create a Minecraft Paper plugin called BombAlchemy.

CORE:

  • Custom Bomb Potions, thrown like splash potions
  • No block damage, only entity effects

ACCESS:

  • Command: /potionbomb
  • Opens INVENTORY GUI for players to get bomb potions
  • No crafting system

STACK:

  • Max stack size = 1
  • Prevent stacking >1

INVENTORY GUI:

  • Simple inventory menu
  • Each slot = 1 bomb type
  • Click to receive 1 bomb

DATA:

  • Store bomb_type using NBT or PersistentDataContainer

EVENT:

  • Use ProjectileHitEvent
  • Detect bomb_type
  • Cancel default potion behavior
  • Apply custom logic

BOMBS:

IMPACT:

  • Instant explode
  • ~4โ€“5 hearts

DELAY:

  • 2s delay then explode

GRAVITY:

  • Pull nearby entities โ†’ explode

TOXIC:

  • Explode + poison + small lingering area

FIRE:

  • Explode + fire
  • ~6โ€“7 hearts

FROST:

  • Explode + strong slowness

SHOCKWAVE:

  • Low damage
  • Strong knockback

RULES:

  • createExplosion(loc, power, false, false)
  • Affect entities only
  • Small radius

COOLDOWN:

  • 2โ€“4s per player

BALANCE:

  • No one-shot full HP
  • Damage ~3โ€“7 hearts

PERFORMANCE:

  • Limit radius
  • Use scheduler for delay bombs

COMPAT:

  • Works with MultiPotion
  • Only modify custom bombs

GOAL:

  • Players select bombs from INVENTORY GUI
  • Use and combo bombs in PvP
Kodari AI
KodariMar 24 at 4:58 pm 16,783 (v2)

Iโ€™ll create a complete bomb alchemy plugin with GUI-based bomb selection and custom explosion mechanics.

BombAlchemy
A dynamic potion bomb plugin featuring 7 unique throwable bombs with custom effects. Players select bombs from an inventory GUI and use them in combat. Includes impact, delay, gravity, toxic, fire, frost, and shockwave bombs with balanced damage and cooldown systems. All explosions affect only entities with no block damage.

All files created! The plugin features:

7 Unique Bombs:

  • Impact: Instant high damage

  • Delay: 2-second countdown with visual marker

  • Gravity: Pulls enemies before exploding

  • Toxic: Poison + lingering cloud

  • Fire: Maximum damage + ignition

  • Frost: Freezes enemies with Slowness IV

  • Shockwave: Massive knockback

Key Systems:

  • GUI-based selection (no crafting)

  • Stack limit enforcement (max 1 per slot)

  • Cooldown management (3s default)

  • PersistentDataContainer for bomb identification

  • No block damage (entity-only explosions)

  • Full XSeries compatibility (1.8-1.21+)

Usage: /potionbomb opens the bomb selection GUI. Click any bomb to receive it, throw like a splash potion for custom effects.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
17 970
src/main/java/com/example/bombalchemy/BombAlchemy.java
package com.example.bombalchemy;

import com.example.bombalchemy.bomb.BombManager;
import com.example.bombalchemy.commands.PotionBombCommand;
import com.example.bombalchemy.cooldown.CooldownManager;
import com.example.bombalchemy.inventory.gui.GUIListener;
import com.example.bombalchemy.inventory.gui.GUIManager;
import com.example.bombalchemy.listener.InventoryClickListener;
import com.example.bombalchemy.listener.ProjectileListener;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class BombAlchemy extends JavaPlugin {
    private GUIManager guiManager;
    private BombManager bombManager;
    private CooldownManager cooldownManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.guiManager = new GUIManager();
        this.bombManager = new BombManager(this);
        this.cooldownManager = new CooldownManager(this);
        
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new ProjectileListener(this), this);
        Bukkit.getPluginManager().registerEvents(new InventoryClickListener(), this);
        
        getCommand("potionbomb").setExecutor(new PotionBombCommand(this));
        
        getLogger().info("BombAlchemy enabled successfully!");
    }
    
    @Override
    public void onDisable() {
        getLogger().info("BombAlchemy disabled!");
    }
}