sneekyplayz_
📎 1 file 3,005 chars
📄
pasted-code-1775711704505.txt
txt 150 lines
▶
Create a complete Minecraft Spigot/Paper plugin for version 1.21.11 with advanced event systems and a custom 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 center of 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
* Spawns a cloud using particles
* Every 10 seconds, drop 10 items (random mix):

  * Golden Apples
  * Enchanted Books
  * Breeze Rods
  * Diamonds
* Ends automatically after time
* Show start/end using title

---

## ENCHANTER STORM EVENT

Command: /enchancloud 

* Only usable by OP players
* Spawns magical cloud
* If player drops weapon/armor under cloud:

  * Lightning strike effect
  * Apply random enchantments (Level 1 only):

    * Mending
    * Unbreaking
    * Protection
* Add particles + sound
* Prevent spam (cooldown per item)

---

## LUCKY STORM EVENT (UPGRADE)

Command: /luckycloud 

* Only usable by OP players
* Spawns stronger cloud
* If player drops already enchanted item:

  * Lightning strike
  * Upgrade enchantments:

    * Level 1 → Level 2
    * Level 2 → Level 3 (chance-based)
* Respect max enchant limits
* Strong particles

---

## POLL / VOTING SYSTEM

Command: /poll start     ...

* Only usable by OP players
* Example:
  /poll start WHO_IS_THE_PROEST_PLAYER_THE_SMP SneekyPlayz Blaze NoobMaster

Rules:

* Use "_" as space replacement in question
* Convert "_" into spaces when displaying
* Unlimited options allowed (minimum 2)

Display:

* Show poll to all players in chat like:
  [POLL] Who is the proest player the smp?

  1. SneekyPlayz
  2. Blaze
  3. NoobMaster

Voting:

* Players vote using:
  /poll vote 

Features:

* Each player can vote only once
* Store votes in memory during poll
* Show live vote count (optional)

Command: /poll end

* Ends the poll
* Shows final result:

  * Total votes per option
  * 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 LOGIC

* Use particle effects for clouds
* Lightning should not damage players
* Detect dropped items under cloud area
* Each item processed once per drop
* Ensure server performance stability

Provide full source code including:

* Main class
* Command classes
* Event listeners
* config.yml
* plugin.yml
Kodari AI
KodariApr 9 at 5:17 am 14,646 (v2)

I’ll create a complete event system plugin with global messages, drop parties, enchanting clouds, and a poll system.

EventsPlugin
Advanced event system with drop parties, enchanting clouds, lucky upgrade storms, and interactive polling. Features particle-based clouds, automatic item spawning, enchantment application/upgrading, and real-time voting with result displays. Includes OP-only commands for global messages, timed events, and poll management with spam prevention and cooldown systems.

All files created successfully! The EventsPlugin includes:

Features:

  • Global message system with title display

  • Drop party with particle clouds and automatic item spawning

  • Enchant cloud that applies random enchantments to dropped items

  • Lucky cloud that upgrades existing enchantments

  • Complete poll/voting system with results display

Commands:

  • /globalmsg <message> - Center screen message display

  • /dropparty <seconds> - Spawns drop party for specified duration

  • /enchancloud <seconds> - Creates enchanting cloud

  • /luckycloud <seconds> - Creates upgrade cloud

  • /poll start <question> <options...> - Start new poll

  • /poll vote <number> - Vote on active poll

  • /poll end - Display results and end poll

All commands are OP-only except voting. The plugin uses XSeries for cross-version compatibility, includes proper cooldowns, spam prevention, and particle effects.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
17 1,052
src/main/java/com/example/eventsplugin/EventsPlugin.java
package com.example.eventsplugin;

import com.example.eventsplugin.commands.*;
import com.example.eventsplugin.config.ConfigManager;
import com.example.eventsplugin.listeners.CloudEventListener;
import com.example.eventsplugin.managers.CloudEventManager;
import com.example.eventsplugin.managers.DropPartyManager;
import com.example.eventsplugin.managers.PollManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class EventsPlugin extends JavaPlugin {
    private ConfigManager configManager;
    private PollManager pollManager;
    private DropPartyManager dropPartyManager;
    private CloudEventManager cloudEventManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        this.pollManager = new PollManager();
        this.dropPartyManager = new DropPartyManager(this);
        this.cloudEventManager = new CloudEventManager(this);
        
        registerCommands();
        registerListeners();
        
        getLogger().info("EventsPlugin has been enabled!");
    }

    @Override
    public void onDisable() {
        if (dropPartyManager != null) {
            dropPartyManager.cleanup();
        }
        if (cloudEventManager != null) {
            cloudEventManager.cleanup();
        }
        getLogger().info("EventsPlugin has been disabled!");
    }

    private void registerCommands() {
        getCommand("globalmsg").setExecutor(new GlobalMessageCommand());
        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 CloudEventListener(this), this);
    }
}