elixr0297
πŸ“Ž 1 file 2,307 chars
πŸ“„
pasted-code-1777309320988.txt
txt 77 lines
β–Ά
I want you to create a complete, production-ready Minecraft Java plugin.

Plugin Name: OriginsTest
Minecraft Version: 1.20+
Platform: Paper (preferred)

Plugin Concept:
When an operator runs the command:

/origins start

Every online player is randomly assigned one of 8 origins.
For now, only implement 3 origins for testing:

- Strength (Yellow particles)
- Blaze (Orange particles)
- Defence (Blue particles)

Core Features:

1. Command System:
   - Command: /origins start
   - Only operators or players with permission origins.admin can use it.
   - Broadcast message when origins begin.
   - Prevent command from being spammed while animation is running.

2. Random Origin Assignment:
   - Each online player gets ONE random origin.
   - Store origin in memory (HashMap).
   - No data saving yet (testing phase only).

3. Particle Ring Animation:
   - When assigned, a ring of colored particles appears around each player.
   - Ring lasts 10 seconds.
   - Ring rotates smoothly around the player.
   - Particle color must match origin:
        Strength = Yellow (DustOptions RGB 255,255,0)
        Blaze = Orange (RGB 255,140,0)
        Defence = Blue (RGB 0,100,255)
   - Use Particle.REDSTONE with DustOptions for custom colors.
   - Ring radius: 1.5 blocks.
   - Use BukkitRunnable.
   - Optimized so it does not lag with many players.

4. Title Display:
   - After particles begin:
       - A title fades in smoothly.
       - Displays: "You are..."
       - Then large bold origin name.
   - Fade in: 20 ticks
   - Stay: 120 ticks (~6 seconds)
   - Fade out: 40 ticks
   - Total visible time ~8 seconds.
   - Use modern sendTitle API (non deprecated).

5. Structure Requirements:
   - Clean OOP structure:
       - Main class
       - OriginManager
       - OriginType enum
       - OriginCommand
       - AnimationManager
   - No deprecated API usage.
   - Proper null checks.
   - No memory leaks.
   - Cancel tasks properly after 10 seconds.

6. Include:
   - plugin.yml
   - Full folder structure
   - All imports
   - Complete working code
   - No shortened code
   - Must compile without errors.

This is Phase 1 only (no abilities yet).
Make it clean and expandable for future ability additions.
Kodari AI
KodariApr 27 at 5:03 pm 10,718 (v2)

I’ll create a complete, production-ready Origins plugin with particle animations and title displays.

OriginsTest
Origin assignment system for Minecraft 1.20+ that randomly assigns players one of three origins (Strength, Blaze, Defence) with animated colored particle rings and dramatic title reveals. Features smooth rotating particle effects, permission-based commands, and optimized performance for multiple players. Includes animation locks to prevent spam and proper resource cleanup.

Structure

Plain Text
src/main/java/com/originstest/
β”œβ”€β”€ OriginsTest.java (main)
β”œβ”€β”€ command/
β”‚   └── OriginsCommand.java
β”œβ”€β”€ manager/
β”‚   β”œβ”€β”€ OriginManager.java
β”‚   └── AnimationManager.java
└── model/
    └── OriginType.java

Complete! βœ…

I’ve created a production-ready Origins plugin with all requested features:

βœ… Core Features:

  • /origins start - Assigns random origins with permission check

  • Animation lock prevents spam during execution

  • 3 origins: Strength (Yellow), Blaze (Orange), Defence (Blue)

  • Origins stored in memory (HashMap)

βœ… Particle System:

  • Rotating ring of colored particles (1.5 block radius)

  • Custom colors using Particle.DUST with DustOptions

  • 10-second duration (200 ticks)

  • Optimized: 30 particles per frame, updates every tick

  • Smooth rotation with angle increment

βœ… Title Display:

  • β€œYou are…” main title

  • Origin name as bold, colored subtitle

  • Timing: Fade in 1s β†’ Stay 6s β†’ Fade out 2s

  • Uses modern Paper Adventure API

βœ… Architecture:

  • Clean OOP with manager pattern

  • Proper task cancellation (no memory leaks)

  • Null-safe with online checks

  • Expandable for future abilities

Compile with ./gradlew build and drop into your Paper 1.20+ server’s plugins folder!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
7 324
src/main/java/com/originstest/OriginsTest.java
package com.originstest;

import com.originstest.command.OriginsCommand;
import com.originstest.manager.AnimationManager;
import com.originstest.manager.OriginManager;
import org.bukkit.plugin.java.JavaPlugin;

public class OriginsTest extends JavaPlugin {
    private OriginManager originManager;
    private AnimationManager animationManager;
    
    @Override
    public void onEnable() {
        originManager = new OriginManager();
        animationManager = new AnimationManager(this);
        
        OriginsCommand originsCommand = new OriginsCommand(this, originManager, animationManager);
        getCommand("origins").setExecutor(originsCommand);
        
        getLogger().info("OriginsTest has been enabled!");
    }
    
    @Override
    public void onDisable() {
        animationManager.cancelAll();
        originManager.clearAll();
        getLogger().info("OriginsTest has been disabled!");
    }
}