sneekyplayz_
📎 1 file 4,429 chars
📄
pasted-code-1775797923776.txt
txt 198 lines
▶
Create a complete Minecraft Spigot/Paper plugin for version 1.21.11 with advanced custom event systems and a live poll/voting system. The plugin must be fully functional, optimized, and bug-free.

================================
GLOBAL MESSAGE SYSTEM
=====================

Command: /globalmsg 

* Only usable by OP players
* Message should NOT appear in chat
* Display in the center of the screen (title/subtitle style)
* No "global announcement" text
* Semi-transparent background
* Medium-sized text with smooth fade-in and fade-out

================================
DROP PARTY EVENT
================

Command: /dropparty 

* Only usable by OP players
* Spawn a cloud using particle effects
* Every 10 seconds, drop 10 items (random mix):

  * Golden Apples
  * Enchanted Books (must contain real enchants like Mending, Unbreaking, Fortune, Protection, etc.)
  * Breeze Rods
  * Diamonds
* Event ends automatically after given time
* Show start/end using title system

================================
ENCHANTER STORM EVENT
=====================

Command: /enchancloud 

* Only usable by OP players
* Spawn a magical cloud using particles
* MULTIPLE players must be able to use it at the same time

When a player drops a valid item (weapon/armor/tool) under the cloud:

LIGHTNING SYSTEM (IMPORTANT):

* Lightning must strike the item repeatedly for 5 seconds
* Strike interval: every 0.5–1 second
* Total 5–10 lightning strikes per item
* Lightning must be VISUAL only:

  * No damage to players
  * No fire

AFTER LIGHTNING:

* Apply random enchantments (Level 1 only)

Enchant Rules:

* Armor → Protection, Unbreaking, Mending
* Weapons → Sharpness, Unbreaking, Mending
* Tools → Efficiency, Fortune, Unbreaking, Mending

STRICT RULE:

* Do NOT apply invalid enchantments
  Example:

  * Protection must NOT go on swords
  * Sword must only get sword-compatible enchants

SYSTEM RULES:

* Each item must be processed ONLY once
* Cooldown per ITEM (not per player)
* Multiple items from multiple players must work simultaneously

================================
LUCKY STORM EVENT (UPGRADE PHASE)
=================================

Command: /luckycloud 

* Only usable by OP players
* Spawn a stronger cloud

When player drops an already enchanted item:

LIGHTNING SYSTEM:

* Same repeated lightning for 5 seconds

AFTER LIGHTNING:

* Upgrade enchantments:

  * Level 1 → Level 2
  * Level 2 → Level 3 (chance-based)

RULES:

* Respect Minecraft max enchant levels
* Only upgrade EXISTING enchantments
* Do NOT add new enchantments in this phase

================================
LIVE POLL / VOTING SYSTEM
=========================

Command: /poll start     ...
Example:
/poll start WHO_IS_BETTER Caylus Steak

Rules:

* "_" should be converted into spaces
* Minimum 2 options, unlimited allowed

DISPLAY SYSTEM (IMPORTANT):

* Show poll visually using:

  * BossBar / ActionBar / Scoreboard

* Display format example:
  Who is better (Timer)
  [Caylus] ██████ 60%
  [Steak]  ████ 40%

* Must update LIVE when players vote

VOTING:
Command: /poll vote 

* Each player can vote only once
* Vote updates instantly

EXTRA UI:

* While poll is active:

  * Show message under poll:
    "Use /poll vote  to vote"

Command: /poll end

* Ends poll
* Show final results:

  * Total votes
  * Highlight winner

================================
GENERAL REQUIREMENTS
====================

* Use config.yml for:

  * Cloud location
  * Drop settings

* Permissions:

  * plugin.globalmsg
  * plugin.dropparty
  * plugin.enchancloud
  * plugin.luckycloud
  * plugin.poll

* Clean modular code

* No deprecated methods

* Compatible with Spigot/Paper 1.21.11

================================
IMPORTANT PERFORMANCE & LOGIC
=============================

* Cloud must support MULTIPLE players simultaneously
* Detect dropped items using event listeners
* Each item processed once
* Lightning must not cause lag or damage
* Optimize for multiplayer performance

================================
OUTPUT
======

Provide full working source code including:

* Main class
* Command classes
* Event listeners
* config.yml
* plugin.yml
Kodari AI
KodariApr 10 at 5:15 am 16,095 (v2)

I’ll create a complete event system plugin with global messages, drop parties, enchantment clouds, and live polling.

EventStormSystem
Advanced event plugin with global messages, drop parties, enchantment storms, and live polling. Features particle-based clouds for enchanting items with lightning effects, timed drop party events with randomized loot, and real-time voting system with BossBar visualization. Supports multiple simultaneous players and includes configurable cloud locations, item pools, and enchantment rules. Optimized for multiplayer servers with visual-only lightning and anti-lag measures.

All files created! The EventStormSystem plugin includes:

Features:

  • Global messages displayed as titles (no chat spam)

  • Drop party clouds with timed loot drops (Golden Apples, Diamonds, Breeze Rods, Enchanted Books)

  • Enchanter Storm with visual lightning strikes that apply enchantments to dropped items

  • Lucky Storm that upgrades existing enchantments on items

  • Live polling system with BossBar visualization and real-time vote tracking

Technical highlights:

  • Multiple players can use clouds simultaneously

  • Item tracking prevents double-processing

  • Visual-only lightning (no damage/fire)

  • Enchantment validation ensures correct enchants per item type

  • BossBar updates live with vote percentages

  • All XSeries APIs used correctly for cross-version compatibility

  • Clean modular architecture with managers and listeners

  • Configurable cloud locations, drop items, and timing

The plugin is fully functional, optimized for multiplayer, and ready to compile.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
14 1,150
src/main/java/com/eventstorm/EventStormPlugin.java
package com.eventstorm;

import com.eventstorm.command.*;
import com.eventstorm.listener.EnchantCloudListener;
import com.eventstorm.manager.CloudManager;
import com.eventstorm.manager.PollManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class EventStormPlugin extends JavaPlugin {
    
    private CloudManager cloudManager;
    private PollManager pollManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.cloudManager = new CloudManager(this);
        this.pollManager = new PollManager(this);
        
        registerCommands();
        registerListeners();
        
        getLogger().info("EventStormSystem has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (cloudManager != null) {
            cloudManager.shutdown();
        }
        if (pollManager != null) {
            pollManager.shutdown();
        }
        
        getLogger().info("EventStormSystem has been disabled!");
    }
    
    private void registerCommands() {
        getCommand("globalmsg").setExecutor(new GlobalMsgCommand());
        getCommand("dropparty").setExecutor(new DropPartyCommand(this));
        getCommand("enchancloud").setExecutor(new EnchantCloudCommand(this));
        getCommand("luckycloud").setExecutor(new LuckyCloudCommand(this));
        getCommand("poll").setExecutor(new PollCommand(this));
    }
    
    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new EnchantCloudListener(this), this);
    }
}