CreeperConfettiPro

The moment a creeper goes off next to a player, it could be a fireworks show instead. This plugin cancels the block-breaking explosion and puts a fully configurable firework in the same spot: shape, colours, flicker, trail and how often each style appears, all in config.yml.

Bukkit 4.2.0 Folia 4.2.0 Configurable firework shapes 18 languages In-game GUI Config auto-migration

Download the latest build  Installation guide

What this plugin does

CreeperConfettiPro does one thing, but does it thoroughly: it listens for creeper explosions and, depending on a chance you configure, replaces the explosion with a firework.

It hooks EntityExplodeEvent. When the exploding entity is a creeper and the random roll falls inside the configured chance, the plugin:

  1. cancels EntityExplodeEvent, so no blocks are broken;
  2. spawns a firework one block above the creeper;
  3. plays the vanilla explosion sound (volume 2.0), so it still sounds like something blew up;
  4. removes the creeper entity;
  5. detonates the firework one tick later, so the bang and the burst land together.

If the roll misses, the event is left untouched and the creeper explodes exactly like vanilla.

How it works

Creeper detonates EntityExplodeEvent Chance check rand < chance Cancel blast remove the creeper Pick a style weighted random Detonate after 1 tick Vanilla explosion Explosion sound 2.0
A hit takes the upper path; a miss leaves vanilla behaviour alone
!

Only the block-destruction event is cancelled. event.setCancelled(true) stops the creeper's explosion from breaking blocks; the firework spawned in its place is a real entity and is detonated one tick later. To fine-tune which blocks are affected, see Build & extend.

Which build to pick

There are two separate projects. The code is almost identical; only the scheduling layer and the compile target differ. Picking the wrong one fails at startup, so check your server first.

ProjectRuns onCompiled forArtifact
CreeperConfettiPro-bukkit Spigot, Paper, Purpur, Leaves — every Bukkit-family server Java 8 (spigot-api 1.9.4) CreeperConfettiPro-4.2.0-bukkit.jar
CreeperConfettiPro-folia Folia (declares folia-supported: true) Java 17 (folia-api 1.19.4) CreeperConfettiPro-4.2.0-folia.jar
i

Both jars are named CreeperConfettiPro — never install both. The Folia build uses folia-api and region schedulers, so it cannot enable on plain Paper; the Bukkit build calls Bukkit.getScheduler(), which does not exist on Folia.

What you get

Any number of styles
Define as many firework styles as you like; each explosion picks one at random. A single style can hold several effects that play together.
Chances that always total 100%
Values in the config are weights. The plugin normalises them on load, so you never have to do the maths yourself.
In-game style editor
A 54-slot chest GUI: left-click to edit, right-click to preview, hold a firework to import it.
18 languages
Simplified and Traditional Chinese, English, Japanese, Korean, French, German, Spanish and more — with GeoIP auto-detection.
Safe config upgrades
Versioned migration: old files are backed up, new keys are merged, your values are always preserved.
Native Folia support
All scheduling goes through region schedulers, entity work is pinned to its owning region, config reads use volatile caches.

Where to go next

CreeperConfettiPro

苦力怕在玩家身边炸开的那一刻,本可以是一场烟花秀。这个插件取消方块破坏,并在同一个位置放出一支完全可配置的烟花:形状、颜色、闪烁、轨迹、每个样式出现的频率,全部写在 config.yml 里。

Bukkit 4.2.0 Folia 4.2.0 烟花形状可配置 18 种语言 图形化管理界面 配置自动迁移

下载最新版本  安装指南

这是什么插件

CreeperConfettiPro 只做一件事,但把它做得很细:监听苦力怕的爆炸事件,按你配置的概率把「爆炸」替换成「烟花」。

它监听的是 EntityExplodeEvent。当爆炸实体是苦力怕、并且随机数落在配置的概率区间内时,插件会:

  1. 取消 EntityExplodeEvent——不破坏任何方块;
  2. 在苦力怕头顶一格的位置生成一支烟花;
  3. 播放一次原版的爆炸音效(音量 2.0),保留「炸了」的听觉反馈;
  4. 移除苦力怕实体;
  5. 延迟 1 tick 后引爆烟花,让爆炸声与烟花几乎同时出现。

如果随机数没有命中,事件不做任何处理,苦力怕就是一次普通的原版爆炸。

工作流程

苦力怕引爆 EntityExplodeEvent 概率判定 rand < chance 取消爆炸 移除苦力怕实体 抽选样式 按权重随机 引爆烟花 延迟 1 tick 保持原版爆炸 爆炸音效 2.0
命中概率走上面一条路径;未命中则维持原版行为
!

取消的是方块破坏事件。event.setCancelled(true) 让苦力怕的爆炸不再破坏方块;原地生成的烟花是真实实体,会在 1 tick 后引爆。想进一步控制方块列表,见 构建与二次开发。

两个分支怎么选

仓库里有两个独立项目,代码几乎完全一致,差别只在调度方式与编译目标。选错了会在启动时直接报错,所以先确认服务端类型。

项目适用服务端编译目标产物
CreeperConfettiPro-bukkit Spigot、Paper、Purpur、Leaves 等所有 Bukkit 系服务端 Java 8(spigot-api 1.9.4) CreeperConfettiPro-4.2.0-bukkit.jar
CreeperConfettiPro-folia Folia(声明 folia-supported: true) Java 17(folia-api 1.19.4) CreeperConfettiPro-4.2.0-folia.jar
i

两个 jar 的插件名都叫 CreeperConfettiPro,不要同时装。Folia 分支使用了 folia-api 与区域调度器,在普通 Paper 上会因为找不到相关类而无法启用;Bukkit 分支在 Folia 上则会因为 Bukkit.getScheduler() 不存在而失败。

功能一览

任意数量的样式
配置文件里想写几种写几种,每次爆炸随机抽一种。每个样式还能塞入多个烟花效果同时播放。
概率自动凑整
各样式写的是「权重」,插件加载时自动归一化,保证概率之和恒为 100%,改完不用自己算。
游戏内样式编辑
54 格箱子界面:左键编辑、右键预览、手持烟花直接入库,无需改配置文件。
18 种语言
内置简繁中文、英日韩法德西等语言包,language: auto 时通过 GeoIP 自动匹配服务器地区。
配置平滑升级
带版本号的配置迁移:升级时自动备份旧文件、合并新增字段,并保留你填过的所有值。
Folia 原生支持
所有调度走区域调度器,实体操作锁定所属区域,配置读取走 volatile 缓存,不碰主线程假设。

下一步