amiteshmohanty896-boop
📎 1 file 11,468 chars
📄
pasted-code-1779182977879.txt
txt 648 lines
▶
Create a professional Minecraft Java SMP plugin called "Element SMP" for Paper/Spigot 1.21+.

====================================
CORE CONCEPT
====================================

Players cannot choose elements manually.

Elements are obtained ONLY through:
- Crafting rare Element Cores
- Killing Raid Holders during Element Raids
- Future support for bosses/events/dungeons

Each player can only own ONE element at a time.

The plugin should feel:
- Cinematic
- Anime inspired
- Competitive
- Smooth combat
- Viral YouTube SMP style
- Professional quality
- Highly expandable

====================================
IMPORTANT REQUIREMENTS
====================================

- Use CustomModelData for ALL custom items
- Full resource pack support
- Optimized for large SMP servers
- Modular code structure
- Configurable values in config.yml
- INVENTORY GUI systems
- Bossbars/actionbars
- Advanced particles and sounds
- PlaceholderAPI support
- MythicMobs support
- SQLite/MySQL support
- Permission support
- Anti-lag optimized systems

====================================
CUSTOM MODEL DATA SYSTEM
====================================

Create centralized:
- Item Registry
- Texture Registry
- ModelData Registry

Support:
- Future animated textures
- Custom names/lore
- Rarity system
- Easy future additions

====================================
ELEMENT CORE SYSTEM
====================================

Players obtain powers using Element Cores.

Using a core:
- Permanently grants element
- Gives abilities/passives
- Gives starter weapons
- Starts progression

If player uses another core:
- Old element removed
- New element replaces it

====================================
ELEMENT CORES
====================================

Fire Core
CustomModelData: 2001

Water Core
CustomModelData: 2002

Lightning Core
CustomModelData: 2003

Void Core
CustomModelData: 2004

====================================
CUSTOM RECIPE SYSTEM
====================================

Admins must be able to CREATE and EDIT recipes IN-GAME.

NO FILE EDITING REQUIRED.

Create INVENTORY GUI recipe editor system.

Commands:
/recipes
/recipes create
/recipes edit
/recipes delete
/recipes reload

Features:
- Crafting-grid INVENTORY GUI
- Save recipes
- Delete recipes
- Preview recipes
- Support custom items
- Support CustomModelData
- Recipe categories
- Search system
- Pagination
- Duplicate protection

Store recipes in:
plugins/ElementSMP/recipes/

====================================
DEFAULT CORE RECIPES
====================================

FIRE CORE:
- Nether Star
- Blaze Rods
- Magma Blocks
- Fire Charges

WATER CORE:
- Heart of the Sea
- Prismarine
- Diamonds
- Water Buckets

LIGHTNING CORE:
- Nether Star
- Copper Blocks
- Lightning Rods
- End Crystals

VOID CORE:
- Ender Eye
- Echo Shards
- Obsidian
- Nether Star

Recipes configurable.

====================================
ELEMENT PROGRESSION
====================================

Add:
- Element XP
- Skill leveling
- Ability mastery
- Ultimate unlocks
- Progression rewards
- Level scaling

====================================
FIRE ELEMENT
====================================

Theme:
Aggressive burn combat.

PASSIVE — INFERNAL BODY
- Fire/lava immunity
- Fire footsteps while sprinting
- Nearby enemies heat up
- Reduced explosion damage

ABILITY 1 — FLAME BURST
Cooldown: 12s

- Fire projectile
- Explosion on impact
- Burn damage
- Knockback
- Bonus damage to burning enemies

Particles:
- Flames
- Smoke
- Lava

====================================

ABILITY 2 — INFERNO DASH
Cooldown: 18s

- Fast forward dash
- Fire trail behind player
- Burns enemies touched
- Temporary flaming ground

====================================

ABILITY 3 — FIRE CAGE
Cooldown: 30s

- Circular fire prison
- Damages trapped enemies
- Temporary escape prevention

====================================

ABILITY 4 — LAVA SLAM
Cooldown: 40s

- Jump slam attack
- Lava crack visuals
- Burn + slowness
- Launch enemies upward

====================================

ULTIMATE — PHOENIX RAGE
Cooldown: 5m

Duration: 20s

Effects:
- Massive fire aura
- Strength boost
- Constant fire explosions
- Resistance buff
- One temporary revive

Visuals:
- Giant phoenix particles
- Cinematic bossbar
- Fire screen effects

====================================
WATER ELEMENT
====================================

Theme:
Healing and crowd control.

PASSIVE — OCEAN SOUL
- Water breathing
- Faster swimming
- Reduced fall damage near water
- Regeneration in water

====================================

ABILITY 1 — WATER PRISON
Cooldown: 20s

- Trap enemy in water sphere
- Heavy slowness
- Drowning damage

====================================

ABILITY 2 — HEALING RAIN
Cooldown: 30s

- Healing area
- Extinguishes fire
- Ally regeneration

====================================

ABILITY 3 — AQUA DASH
Cooldown: 15s

- Water burst dash
- Water trail
- Speed boost on wet blocks

====================================

ABILITY 4 — ICE SPEARS
Cooldown: 25s

- Launch ice projectiles
- Slowness effect
- Freeze chance

====================================

ULTIMATE — TSUNAMI
Cooldown: 5m

- Giant water wave
- Knockback
- Slowness
- Flood visuals

====================================
LIGHTNING ELEMENT
====================================

Theme:
Speed and burst damage.

PASSIVE — STORM ENERGY
- Speed boost during storms
- Chance to shock attackers
- Faster attacks

====================================

ABILITY 1 — THUNDER STRIKE
Cooldown: 15s

- Lightning attack
- Brief stun
- Extra storm damage

====================================

ABILITY 2 — ELECTRIC DASH
Cooldown: 12s

- Teleport-like dash
- Lightning trail
- Fast movement

====================================

ABILITY 3 — CHAIN SHOCK
Cooldown: 20s

- Lightning chain attack
- Hits multiple enemies

====================================

ABILITY 4 — STATIC FIELD
Cooldown: 28s

- Electric area zone
- Slows enemies
- Random lightning strikes

====================================

ULTIMATE — STORM MODE
Cooldown: 5m

Duration: 20s

Effects:
- Massive speed
- Auto chain lightning
- Attack speed boost
- Electric aura damage

====================================
VOID ELEMENT
====================================

Theme:
Darkness and teleportation.

PASSIVE — VOID SOUL
- Dodge chance
- Reduced teleport cooldown
- Partial fall immunity

====================================

ABILITY 1 — VOID PULL
Cooldown: 18s

- Pull nearby enemies
- Interrupt movement

====================================

ABILITY 2 — SHADOW TELEPORT
Cooldown: 10s

- Short teleport
- Temporary invisibility
- Shadow particles

====================================

ABILITY 3 — DARKNESS ORB
Cooldown: 22s

- Blindness projectile
- Vision reduction

====================================

ABILITY 4 — RIFT SLASH
Cooldown: 30s

- Void slash wave
- Passes through walls
- Armor piercing damage

====================================

ULTIMATE — BLACK HOLE
Cooldown: 5m

Duration: 15s

Effects:
- Giant gravity field
- Pull enemies inward
- Damage over time
- Escape slow effect

Visuals:
- Purple/black vortex
- Screen distortion
- Deep ambient sounds

====================================
VISUAL SYSTEMS
====================================

Add:
- Actionbar cooldowns
- Bossbar ultimates
- Damage indicators
- Advanced particles
- Dynamic sounds
- Cinematic titles/subtitles
- Smooth animations
- Element chat colors

====================================
COMBAT SYSTEM
====================================

Add:
- Combo system
- Anti-spam protections
- PvP balancing
- Ability chaining
- Custom status effects
- Combat tagging

====================================
ELEMENT RAID SYSTEM
====================================

Create weekly global event:
"Element Raid"

One selected player with an element becomes:
RAID HOLDER

All players hunt them for 1 hour.

If holder dies:
- Killer steals element instantly
- Old owner loses powers/items
- Raid instantly ends

====================================
RAID FLOW
====================================

Commands:
/raid start 
/raid stop
/raid info
/raid timer
/raid reload

Support:
- Manual start
- Automatic weekly scheduling

Raid Start Effects:
- Global broadcasts
- Titles/subtitles
- Sounds
- Bossbar timer
- Cinematic effects

====================================
RAID RULES
====================================

Raid Duration:
- 1 hour

World Border:
- Shrink smoothly to 2000 blocks radius

Tracking:
Every 10 minutes:
- Broadcast holder coordinates
- Tracking sounds
- Actionbar tracking

Example:
"Raid Holder Location: X:120 Z:-450"

====================================
RAID HOLDER SYSTEM
====================================

Holder gets:
- Special aura
- Increased health
- Cinematic particles
- Temporary tracking resistance
- Raid title effects

====================================
ELEMENT TRANSFER
====================================

When holder dies:
Killer instantly receives:
- Element
- Abilities
- Passives
- Weapons
- Ultimate

Previous owner loses everything.

Add cinematic transfer effects:
- Lightning
- Explosion particles
- Titles
- Sounds
- Bossbar animation

====================================
RAID END CONDITIONS
====================================

Raid ends if:
- Holder dies
- Timer expires
- Admin stops raid

If holder survives:
- Keeps element
- Gets rewards
- Celebration effects

====================================
ANTI-ABUSE SYSTEM
====================================

Add:
- Anti combat logging
- Anti safezone abuse
- Anti alt farming
- Minimum players required
- Raid cooldowns
- Prevent element dropping

====================================
COMMANDS
====================================

ELEMENT:
/element info
/element abilities
/element xp
/element reload
/element admin give

RAID:
/raid start
/raid stop
/raid info
/raid timer
/raid reload

RECIPES:
/recipes
/recipes create
/recipes edit
/recipes delete
/recipes reload

====================================
ADMIN FEATURES
====================================

Add:
- Enable/disable elements
- Configure cooldowns/damage
- Reset elements
- Give custom items
- Debug mode
- Raid controls

====================================
DATABASE SYSTEM
====================================

Save:
- Player progress
- XP
- Levels
- Element owners
- Raid history
- Statistics
- Cooldowns

Support:
- SQLite
- MySQL

====================================
PLUGIN STRUCTURE
====================================

Generate:
- Main plugin class
- Managers
- Elements
- Abilities
- Raid system
- Recipe system
- GUIs
- Listeners
- Commands
- Database manager
- Cooldown manager
- Item registry
- Config system

====================================
MAKE EVERYTHING FEEL:
====================================

- Premium
- Smooth
- Cinematic
- Competitive
- Highly expandable
- Anime inspired
- Optimized
- Viral SMP quality
Kodari AI
KodariMay 19 at 9:44 am 122,720 (v2)

I’ll build the Element SMP plugin — a full-featured, cinematic anime-inspired SMP plugin with elements, raids, recipes, GUIs, and database support.

ElementSMP
A cinematic anime-inspired SMP plugin featuring 4 elemental powers (Fire, Water, Lightning, Void) obtained through crafting or raids. Includes ability systems with cooldowns, an Element Raid event where players hunt the Raid Holder to steal their element, an in-game recipe editor GUI, SQLite/MySQL database, PlaceholderAPI support, progression/XP system, and full visual effects with particles, bossbars, and actionbars.

Here’s my plan:

  • Core infrastructure: Main plugin, config, database (SQLite/MySQL), item registry, cooldown manager

  • Element system: 4 elements with passives + 4 abilities + ultimates, progression/XP

  • Raid system: Raid holder tracking, world border shrink, element transfer on death

  • Recipe system: In-game GUI recipe editor, custom crafting support

  • GUIs: Inventory GUI framework, element info GUI, recipe editor GUI

  • Commands + Listeners: All commands, combat listeners, ability activation

  • PlaceholderAPI + plugin.yml

Let’s build it:

Now I need to add the AbilityRegistry field to the main plugin class and fix the missing import in WaterAbilities:Let me read the files I need to write properly:

All files look correct. Now I need to fix two issues I spotted:

  1. RaidManager uses XSound without importing it

  2. WaterAbilities uses XParticle without importing it

  3. ElementSMP references plugin.getAbilityRegistry() but abilityRegistry is never declared as a field

Now let me also fix the managers/CooldownManager.java — let me read it first:

Everything looks good. Now let me create the build.gradle and manifest.kod:

The project is fully generated. Here’s a summary of everything built:


Element SMP — Complete Plugin Structure

🗂️ Architecture

  • ElementSMP.java — Main plugin class with all manager initialization

  • database/DatabaseManager.java — SQLite/MySQL with auto-reconnect, player data + raid history tables

  • data/PlayerData.java — Lombok data class with XP leveling math

  • data/CustomRecipe.java — Serializable recipe with YAML persistence

⚡ Element System

  • element/ElementType.java — FIRE, WATER, LIGHTNING, VOID with colors & model data (2001–2004)

  • managers/ElementManager.java — Element assignment, XP, level-up, transfer, async saving

  • managers/ItemRegistry.java — Config-driven Element Core items with CustomModelData

  • managers/CooldownManager.java — Per-player per-ability cooldown tracking

🔥 Abilities (4 elements × 5 abilities each)

  • abilities/impl/FireAbilities.java — Flame Burst, Inferno Dash, Fire Cage, Lava Slam, Phoenix Rage

  • abilities/impl/WaterAbilities.java — Water Prison, Healing Rain, Aqua Dash, Ice Spears, Tsunami

  • abilities/impl/LightningAbilities.java — Thunder Strike, Electric Dash, Chain Shock, Static Field, Storm Mode

  • abilities/impl/VoidAbilities.java — Void Pull, Shadow Teleport, Darkness Orb, Rift Slash, Black Hole

  • All ultimates have cinematic bossbars with countdown timers

⚔️ Raid System

  • managers/RaidManager.java — Full raid lifecycle: start, tracking, world border shrink, element transfer on kill, weekly auto-scheduling

  • listeners/RaidListener.java — Holder disconnect handling

  • listeners/CombatListener.java — Raid kill detection + element transfer

🎮 GUI System

  • Full inventory GUI framework (InventoryHandler → InventoryButton → InventoryGUI → GUIManager/GUIListener)

  • ElementInfoGUI — Player stats, level, XP, abilities overview

  • AbilitiesGUI — Per-ability cooldown display

  • RecipeListGUI — Paginated recipe browser with delete

  • RecipeViewGUI — Crafting grid preview

  • RecipeEditorGUI — Full in-game recipe creation by placing items

🎯 Ability Activation (keybinds)

Key
Action
Right-click
Ability 1
Shift + Right-click
Ability 2
Drop (Q)
Ability 3
Shift + Drop
Ability 4
Sneak (shows ultimate cooldown)
—

📊 PlaceholderAPI

%elementsmp_element%, %elementsmp_element_display%, %elementsmp_element_level%, %elementsmp_element_xp%, %elementsmp_raid_active%, %elementsmp_raid_holder%, %elementsmp_is_raid_holder%

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
41 3,957
src/main/java/com/elementSMP/ElementSMP.java
package com.elementSMP;

import com.elementSMP.abilities.AbilityRegistry;
import com.elementSMP.commands.ElementCommand;
import com.elementSMP.commands.RaidCommand;
import com.elementSMP.commands.RecipesCommand;
import com.elementSMP.database.DatabaseManager;
import com.elementSMP.inventory.gui.GUIListener;
import com.elementSMP.inventory.gui.GUIManager;
import com.elementSMP.listeners.AbilityListener;
import com.elementSMP.listeners.CoreListener;
import com.elementSMP.listeners.CombatListener;
import com.elementSMP.listeners.RaidListener;
import com.elementSMP.managers.CooldownManager;
import com.elementSMP.managers.ElementManager;
import com.elementSMP.managers.ItemRegistry;
import com.elementSMP.managers.RaidManager;
import com.elementSMP.managers.RecipeManager;
import com.elementSMP.placeholders.ElementPlaceholders;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class ElementSMP extends JavaPlugin {

    private static ElementSMP instance;

    private DatabaseManager databaseManager;
    private ElementManager elementManager;
    private CooldownManager cooldownManager;
    private RaidManager raidManager;
    private RecipeManager recipeManager;
    private ItemRegistry itemRegistry;
    private GUIManager guiManager;
    private AbilityRegistry abilityRegistry;

    @Override
    public void onEnable() {
        instance = this;
        saveDefaultConfig();

        this.databaseManager = new DatabaseManager(this);
        this.databaseManager.initialize();

        this.itemRegistry = new ItemRegistry(this);
        this.cooldownManager = new CooldownManager();
        this.elementManager = new ElementManager(this);
        this.raidManager = new RaidManager(this);
        this.recipeManager = new RecipeManager(this);
        this.guiManager = new GUIManager();
        this.abilityRegistry = new AbilityRegistry(this);

        registerListeners();
        registerCommands();

        if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
            new ElementPlaceholders(this).register();
            getLogger().info("PlaceholderAPI hooked successfully.");
        }

        raidManager.scheduleWeeklyRaid();

        getLogger().info("ElementSMP enabled successfully!");
    }

    @Override
    public void onDisable() {
        if (raidManager != null) {
            raidManager.forceStop();
        }
        if (databaseManager != null) {
            databaseManager.shutdown();
        }
        getLogger().info("ElementSMP disabled.");
    }

    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new CoreListener(this), this);
        Bukkit.getPluginManager().registerEvents(new AbilityListener(this), this);
        Bukkit.getPluginManager().registerEvents(new CombatListener(this), this);
        Bukkit.getPluginManager().registerEvents(new RaidListener(this), this);
    }

    private void registerCommands() {
        getCommand("element").setExecutor(new ElementCommand(this));
        getCommand("raid").setExecutor(new RaidCommand(this));
        getCommand("recipes").setExecutor(new RecipesCommand(this));
    }

    public static ElementSMP getInstance() {
        return instance;
    }
}