tutucold_2
📎 1 file 1,684 chars
📄
pasted-code-1777345829453.txt
txt 89 lines
▶
 STEP 1 — PROJECT SETUP

Create base plugin structure:

Main class: GuiltyJudgementSystem.java
plugin.yml
Packages:
commands
managers
listeners

Register everything properly.

No gameplay features yet.

 STEP 2 — GUILTY COMMAND
Command:
/guilty  (OP only)
Behavior:
Takes a target player
Broadcast globally:
" Has been found GUILTY for his sin."
Stores the player UUID as the “guilty target” in JudgementManager
Rules:
Command must require a valid online player
If player not found:
Send error: "Player not found."
 STEP 3 — LIGHTNING PUNISHMENT SYSTEM

When /guilty  is executed:

Start a 30-second lightning storm:

Storm Rules:
Centered on target player
Radius: 50 blocks
Duration: 30 seconds
10 lightning strikes per second
Random positions within radius
Implementation Requirements:
Use BukkitRunnable
Run every tick or fast interval
Spawn multiple strikes per cycle to reach 10/sec
Only strike safe ground positions
 STEP 4 — MANAGER SYSTEM

Create JudgementManager:

Must store:

Current guilty target UUID
Active storm state

Must handle:

Start storm
Stop storm
Replace target if command is reused
 STEP 5 — EDGE CASES

Handle:

Player logs out → cancel storm
Player dies → stop storm
Command used again → override previous storm safely
Invalid player name → error message
 STEP 6 — OUTPUT REQUIREMENTS

Provide full plugin code:

Main class
JudgementManager
/guilty command handler
BukkitRunnable lightning system
plugin.yml
 DESIGN GOAL

This plugin creates a divine punishment command system where:

One player is selected
They are declared guilty
A cinematic lightning storm executes punishment

Must be:

Clean
Modular
Performance-safe
UUID-based
Kodari AI
KodariApr 28 at 3:11 am 5,805 (v2)

I’ll create a divine punishment plugin with a lightning storm system.

GuiltyJudgement
A divine punishment plugin that marks players as guilty and executes them with a dramatic 30-second lightning storm. Features OP-only guilty command, global announcements, and automatic storm cancellation on player death or logout. Creates a cinematic judgement experience with 10 lightning strikes per second in a 50-block radius around the condemned player.

Plugin created! Here’s what I built:

Core System:

  • GuiltyJudgementSystem - Main class that initializes all components

  • JudgementManager - Tracks guilty target (UUID) and manages active storm state

  • GuiltyCommand - OP-only command with player validation

  • LightningStormTask - BukkitRunnable executing 10 strikes/second for 30 seconds

  • GuiltyListener - Cancels storm on player logout or death

Lightning Storm Implementation:

  • Runs every 2 ticks (0.1 seconds) = 10 strikes per second

  • Total duration: 600 ticks (30 seconds) = 300 total strikes

  • Random positions within 50-block radius

  • Automatically finds highest block for safe ground strikes

  • Auto-cancels and cleans up after completion

Safety Features:

  • Storm stops if target logs out

  • Storm stops if target dies

  • Reusing /guilty safely cancels previous storm

  • UUID-based tracking prevents issues with name changes

  • Proper cleanup on plugin disable

The broadcast message appears exactly as requested: "<player> Has been found GUILTY for his sin."

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
7 251
src/main/java/com/example/guiltyjudgement/GuiltyJudgementSystem.java
package com.example.guiltyjudgement;

import com.example.guiltyjudgement.commands.GuiltyCommand;
import com.example.guiltyjudgement.listeners.GuiltyListener;
import com.example.guiltyjudgement.managers.JudgementManager;
import org.bukkit.plugin.java.JavaPlugin;

public class GuiltyJudgementSystem extends JavaPlugin {
    
    private JudgementManager judgementManager;
    
    @Override
    public void onEnable() {
        this.judgementManager = new JudgementManager(this);
        
        this.getCommand("guilty").setExecutor(new GuiltyCommand(this, this.judgementManager));
        
        this.getServer().getPluginManager().registerEvents(new GuiltyListener(this.judgementManager), this);
        
        this.getLogger().info("GuiltyJudgement has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (this.judgementManager != null) {
            this.judgementManager.stopStorm();
        }
        this.getLogger().info("GuiltyJudgement has been disabled!");
    }
}