raymc_1
📎 1 file 1,279 chars
📄
pasted-code-1775484915708.txt
txt 40 lines
▶
Create a Minecraft plugin for Purpur (Paper API, Minecraft 1.20+) that plays a dramatic Wither-style sound effect when a player dies.

Requirements:
- Use Java and the Paper/Purpur API
- Listen to the PlayerDeathEvent
- When a player dies, run a scheduled task that plays a sequence of sounds to all online players:

Sound sequence:
1. Play "ENTITY_WITHER_SPAWN"
   - Volume: 3.0
   - Pitch: 0.6

2. After 8 ticks delay:
   Play "ENTITY_WITHER_AMBIENT"
   - Volume: 2.0
   - Pitch: 0.5

3. After another 8 ticks delay:
   Play "ENTITY_WITHER_DEATH"
   - Volume: 2.0
   - Pitch: 0.4

Additional features:
- Strike lightning at the dead player’s location
- Send a title to all players:
   Title: "☠  has fallen ☠"
   Subtitle: ""
   Fade in: 10 ticks, Stay: 40 ticks, Fade out: 10 ticks

Technical requirements:
- Use BukkitRunnable or scheduler properly (no blocking main thread)
- Register events correctly in the main plugin class
- Include a complete main class extending JavaPlugin
- Include plugin.yml content
- Follow clean code practices and modern API usage (no deprecated methods)

Output:
- Full Java plugin code (main class + listener if separate)
- plugin.yml
- Clear instructions on how to compile and install the plugin
Kodari AI
KodariApr 6 at 2:16 pm 7,361 (v2)

I’ll create a dramatic death sound plugin with Wither effects and lightning strikes.

WitherDeathEffect
A dramatic death announcement plugin that plays sequential Wither sounds (spawn, ambient, death) with lightning strikes and title messages when players die. Creates an intense cinematic effect with timed sound sequences and visual effects to announce player deaths to the server.

Plugin created successfully!

The plugin plays a dramatic 3-stage Wither sound sequence when players die, with lightning and title announcements. All sounds are played using XSeries for cross-version compatibility, and the scheduler ensures non-blocking execution. To compile: run ./gradlew build and the JAR will be in build/libs/.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
README.md
Code
5 155
src/main/java/me/plugin/witherdeatheffect/WitherDeathEffect.java
package me.plugin.witherdeatheffect;

import org.bukkit.plugin.java.JavaPlugin;

public class WitherDeathEffect extends JavaPlugin {
    
    @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(new DeathListener(this), this);
        getLogger().info("WitherDeathEffect has been enabled!");
    }
    
    @Override
    public void onDisable() {
        getLogger().info("WitherDeathEffect has been disabled!");
    }
}