elixr0297
๐Ÿ“Ž 1 file 2,441 chars
๐Ÿ“„
pasted-code-1777315495866.txt
txt 101 lines
โ–ถ
I want you to create a production-ready Minecraft Java plugin.

Plugin Name: OriginsCore
Minecraft Version: 1.20+
Platform: Paper

PLUGIN GOAL:

When an operator types:

/origins start

Every online player enters a cinematic origin rolling animation instead of being instantly assigned.

----------------------------------
ROLL ANIMATION SYSTEM
----------------------------------

For 8 seconds:

1. Rainbow particles swirl around the player.
   - Spiral animation (not flat circle).
   - Particles rotate upward around the player.
   - Smooth animation.
   - Efficient BukkitRunnable.
   - No lag.
   - Automatically cancels after 8 seconds.

2. Titles cycle rapidly through ALL 8 origin names:

   STRENGTH (Yellow)
   INFERNO (Orange)
   DEFENCE (Blue)
   BOLT (White)
   FORTUNE (Green)
   BLOODLUST (Red)
   TIDE (Aqua)
   LUMINOUS (Purple)

3. The title switching should:
   - Start fast (every 5 ticks).
   - Gradually slow down.
   - Smooth deceleration effect.
   - Feels like a slot machine.
   - Each title appears in its corresponding color.
   - No subtitle.

----------------------------------
FINAL REVEAL
----------------------------------

After 8 seconds:

- Randomly choose ONE origin.
- Store it in HashMap.
- Show final large colored title:
   ORIGIN NAME ONLY
- Final reveal lasts 5 seconds.
- Fade in: 20 ticks
- Stay: 80 ticks
- Fade out: 20 ticks

- Add a subtle burst particle effect on final reveal.
- Optional: play a level-up sound.

----------------------------------
/origins stop
----------------------------------

- Cancels any rolling animation.
- Clears all assigned origins.
- Cancels all running tasks safely.
- Prevent memory leaks.

----------------------------------
TECH REQUIREMENTS
----------------------------------

- Main class
- OriginType enum (store RGB + ChatColor + display name)
- OriginManager
- RollAnimationManager
- Command class
- Proper task tracking per player
- Use HashMap to manage animations
- Proper null checks
- No deprecated API
- Clean OOP structure
- Efficient math for spiral animation
- Must compile without errors

----------------------------------
OUTPUT
----------------------------------

- Full folder structure
- All files separately
- All imports included
- Full plugin.yml
- No shortened code
- Clean professional formatting
Kodari AI
KodariApr 27 at 6:47 pm 12,406 (v2)

Iโ€™ll create a production-ready cinematic origin rolling system with particle spirals and slot-machine title cycling.

OriginsCore
A cinematic origin assignment system featuring animated rainbow particle spirals and slot-machine style title reveals. When triggered by operators, all players experience an 8-second visual spectacle with gradually decelerating title cycling through 8 unique origins before being randomly assigned. Includes smooth particle effects, sound cues, and efficient task management with proper cleanup.

Implementation Plan

  1. OriginType Enum - 8 origins with colors, RGB values, display names

  2. OriginManager - Stores player assignments (UUID โ†’ OriginType)

  3. RollAnimationManager - Handles particle spirals + title cycling with deceleration

  4. OriginsCommand - /origins start and /origins stop

  5. Main Class - Initializes managers, registers commands, cleanup on disable

Complete! Ready to compile and test

Features implemented:

  • Rainbow particle spiral (8 particles rotating upward, smooth animation)

  • Slot-machine title cycling (starts at 5 ticks, decelerates quadratically to 30 ticks)

  • 8 colored origins (each with unique colors and RGB values)

  • 8-second animation (160 ticks precisely timed)

  • Final reveal (5-second title with fade effects, firework burst, level-up sound)

  • Memory-safe task management (HashMap tracking, proper cleanup)

  • Commands work (/origins start for all players, /origins stop cancels everything)

All code is production-ready with no deprecated APIs, complete imports, and compiled for Java 17 + Paper 1.20.1+.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
IMPORTANT.txt
settings.gradle
Code
9 428
src/main/java/com/example/originscore/OriginsCore.java
package com.example.originscore;

import com.example.originscore.command.OriginsCommand;
import com.example.originscore.manager.OriginManager;
import com.example.originscore.manager.RollAnimationManager;
import org.bukkit.plugin.java.JavaPlugin;

public class OriginsCore extends JavaPlugin {
    private OriginManager originManager;
    private RollAnimationManager rollAnimationManager;
    
    @Override
    public void onEnable() {
        this.originManager = new OriginManager();
        this.rollAnimationManager = new RollAnimationManager(this, originManager);
        
        OriginsCommand command = new OriginsCommand(rollAnimationManager, originManager);
        getCommand("origins").setExecutor(command);
        
        getLogger().info("OriginsCore has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (rollAnimationManager != null) {
            rollAnimationManager.stopAllRolls();
        }
        
        getLogger().info("OriginsCore has been disabled!");
    }
}