insann0491_40243

Plugin Name: Ultimate SMP Events

Create a Minecraft Paper/Spigot plugin for version 1.21.x designed for SMP servers. The goal is to create exciting manual events that motivate players to explore, fight, and grind for rare rewards.

Admins should start events manually with commands, but everything else must happen automatically.

The plugin must be stable, optimized, and bug-free, and work on Paper servers without lag.

Core System

Admins start events manually.

Command:

/event start <event>

Example:

/event start treasure /event start airdrop /event start koth /event start meteor

When an event starts the plugin must automatically:

• Choose a random location • Ensure the location is at least 2000 blocks away from spawn • Broadcast exact coordinates in chat • Show title message on screen • Play sound effect • Show optional bossbar countdown

Example broadcast:

⚔ SERVER EVENT ⚔ Treasure Hunt has started!

Location: X: 3450 Y: 70 Z: -2180

No clues system should exist. Players only get coordinates.

Spawn Distance Protection

Every event must spawn minimum 2000 blocks away from spawn.

Example config:

minimum_spawn_distance: 2000 world_border_check: true safe_location_check: true

The plugin must automatically avoid oceans, lava pools, and unsafe locations.

Reward System

There is no money system.

Rewards must be high-value items only (diamond tier and above).

Possible rewards:

• Diamonds • Enchanted Diamond Gear • Netherite Gear • Totem of Undying • Elytra • OP enchanted items • Custom rare items

Loot Rarity System

Rewards should have rarity chances.

Example:

Common – 40% Uncommon – 30% Rare – 18% Legendary – 10% Illegal – 2%

Illegal items are extremely rare and can include:

• Sharpness 10 sword • Protection 10 armor • Special glowing custom item

Events Included Treasure Hunt

Command:

/event start treasure

Plugin spawns a hidden chest at a random location.

First player to open the chest wins.

Airdrop Event

Command:

/event start airdrop

Plugin spawns a falling crate with a beacon beam marking the location.

First player to open it wins.

King of the Hill

Command:

/event start koth

Plugin creates a capture zone.

Players must stay inside the zone for 60 seconds.

Player holding the hill wins.

Dragon Egg Event

A dragon egg spawns at a random location.

First player to pick it up wins.

Meteor Drop

A meteor falls from the sky and creates an explosion.

Rare loot appears inside the meteor.

Artifact Event

A special artifact chest spawns containing rare items.

Boss Raid

A powerful custom boss mob spawns.

Player dealing the most damage gets the reward.

Maze Challenge

A maze structure spawns.

First player to reach the center chest wins.

Lucky Chest Storm

Multiple chests spawn in a small area.

Players race to open them.

Hidden Villager

A villager NPC spawns randomly.

First player to find and click him wins.

Announcement System

Admins can broadcast announcements.

Command:

/announce <message>

Example:

/announce Event starting in 2 minutes!

This should display:

• Chat broadcast • Title message • Sound effect

Win Effects

When someone wins an event:

• Fireworks spawn • Title message appears • Winner is announced in chat

Example:

🏆 EVENT WINNER 🏆 Ali has won the Treasure Hunt!

Anti-Bug Protection

The plugin must include:

• Safe location detection • Event auto cancel if no players nearby • Prevent multiple winners • Prevent event spawning in protected regions • Prevent spawning inside blocks

Admin Commands /event start <event> /event stop /event reload /announce <message> Extra Features (recommended)

Add these features to improve gameplay:

Event Cooldown Prevent starting events too quickly.

Event History Track last winners.

Command:

/event winners

Bossbar Timer Shows remaining event time.

Event Particles Spawn particles above event location.

Performance Requirements

• Must support 50+ players without lag • Use optimized code • Compatible with Paper 1.21.x • No memory leaks • Clean config system

Kodari AI
KodariMar 6 at 8:44 am 31,414 (v2)

I’ll create a comprehensive SMP events plugin with manual admin-triggered events, automatic location selection, and a rarity-based loot system.

UltimateSMPEvents
A comprehensive SMP event system that allows admins to manually start exciting events like treasure hunts, airdrops, KOTH, meteor drops, and boss raids. Features automatic location selection with spawn distance protection, rarity-based loot system with high-value rewards from diamond to illegal-tier items, winner tracking, and performance optimizations for 50+ player servers on Paper 1.21.x.

I’ll create a complete SMP events plugin with 10 different event types, automated location selection, and a rarity-based loot system.

Plugin created successfully with 10 event types, automatic location selection with 2000+ block spawn distance protection, rarity-based loot system (Common to Illegal tier), winner tracking GUI, and full admin commands. All events include particle effects, proper XSeries usage, and Paper 1.21.x compatibility.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
33 2,109
src/main/java/com/ultimatesmpe/UltimateSMPEvents.java
package com.ultimatesmpe;

import com.ultimatesmpe.command.AnnounceCommand;
import com.ultimatesmpe.command.EventCommand;
import com.ultimatesmpe.event.EventManager;
import com.ultimatesmpe.inventory.gui.GUIListener;
import com.ultimatesmpe.inventory.gui.GUIManager;
import com.ultimatesmpe.listener.EventListener;
import com.ultimatesmpe.manager.AnnouncementManager;
import com.ultimatesmpe.manager.LocationManager;
import com.ultimatesmpe.manager.RewardManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;

@Getter
public class UltimateSMPEvents extends JavaPlugin {
    private EventManager eventManager;
    private LocationManager locationManager;
    private RewardManager rewardManager;
    private AnnouncementManager announcementManager;
    private GUIManager guiManager;
    
    private FileConfiguration rewardsConfig;
    private FileConfiguration messagesConfig;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        loadConfigs();
        
        this.locationManager = new LocationManager(this);
        this.rewardManager = new RewardManager(this);
        this.announcementManager = new AnnouncementManager(this);
        this.guiManager = new GUIManager();
        this.eventManager = new EventManager(this);
        
        getCommand("event").setExecutor(new EventCommand(this));
        getCommand("announce").setExecutor(new AnnounceCommand(this));
        
        Bukkit.getPluginManager().registerEvents(new EventListener(this), this);
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        
        getLogger().info("UltimateSMPEvents has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (eventManager != null) {
            eventManager.stopCurrentEvent();
        }
        getLogger().info("UltimateSMPEvents has been disabled!");
    }
    
    private void loadConfigs() {
        File rewardsFile = new File(getDataFolder(), "rewards.yml");
        if (!rewardsFile.exists()) {
            saveResource("rewards.yml", false);
        }
        rewardsConfig = YamlConfiguration.loadConfiguration(rewardsFile);
        
        File messagesFile = new File(getDataFolder(), "messages.yml");
        if (!messagesFile.exists()) {
            saveResource("messages.yml", false);
        }
        messagesConfig = YamlConfiguration.loadConfiguration(messagesFile);
    }
    
    public void reloadConfigs() {
        reloadConfig();
        loadConfigs();
        locationManager = new LocationManager(this);
        rewardManager = new RewardManager(this);
    }
}