Lakshay Ahlawat

Create a Minecraft plugin for Wyrn SMP called Wyrn Events.

Commands

"/startevent <eventName> <timerInSeconds>"

When a player uses this command:

  • Take the item currently held in their main hand.
  • Create the event at the player's exact current location.
  • The held item becomes the event item.
  • "<eventName>" is the custom event name.
  • "<timerInSeconds>" controls how long the event lasts.
  • Only one event can be active at a time.

"/cancelevent"

  • Cancels the currently active event.
  • Removes the event item.
  • Removes the hologram.
  • Removes the bossbar.
  • Resets the event properly.

Event Item

Place the held item at the exact location where "/startevent" was executed.

The item should be clearly visible and protected from being accidentally destroyed or moved while the event is active.

When a player successfully claims the event item, end the event immediately.

Chat Announcement

When someone claims the event, announce it to everyone:

"šŸ† <player> has claimed the <item name>!"

Do not show the event coordinates in this claim message.

BossBar

While the event is active, show a colorful bossbar to all players.

It should display:

  • Event name
  • Remaining timer
  • Event coordinates

Example:

"✦ DIAMOND DROP ✦ | ā³ 01:32 | šŸ“ 125, 64, -382"

Make the bossbar visually attractive and colorful, preferably with an animated/changing color effect if supported.

Hologram

Create a plugin-native hologram above the event item. Do not require another hologram plugin.

Example:

"✦ DIAMOND DROP ✦" "ā³ 01:32" "šŸ’Ž Diamond" "↓"

The hologram should:

  • Float above the event item.
  • Update the remaining timer automatically.
  • Disappear when the event is claimed, cancelled, or expires.
  • Use colorful formatting.

Timer

The timer must count down every second.

When the timer reaches "0":

  • Automatically end the event.
  • Remove the event item.
  • Remove the hologram.
  • Remove the bossbar.
  • Send an optional configurable expiration message.

Permissions

Add permissions such as:

"wyrn.event.start" "wyrn.event.cancel"

Only authorized staff should be able to start/cancel events.

Configuration

Create a configurable "config.yml" for:

  • Bossbar format
  • Bossbar colors
  • Hologram text
  • Claim message
  • Expiration message
  • Permission nodes
  • Sounds
  • Event settings

Make the plugin clean, optimized, and production-ready for a Wyrn SMP server.

Use a modern Minecraft server API and make the implementation compatible with Paper/Purpur. Avoid unnecessary dependencies.

Kodari AI
KodariSep 29 at 5:46 am 1
WyrnEvents
A Minecraft plugin for Wyrn SMP that creates timed item-drop events. Staff can start events by holding an item and using /startevent with a custom name and duration. The plugin spawns a protected floating item at the player's location with an animated hologram display and colorful bossbar visible to all players. The bossbar shows event name, countdown timer, and coordinates with animated color cycling. Holograms display event details above the item with automatic timer updates. Events end when claimed by any player, cancelled by staff, or when the timer expires. Includes configurable messages, sounds, permissions, and full event cleanup. Built for Paper/Purpur with no external dependencies.
  1. Set up a Java 21 Paper plugin with start/cancel commands and configurable permissions.

  2. Implement the event lifecycle: protected item, native text hologram, animated bossbar, claim, cancel, and expiry.

  3. Add default configuration and plugin metadata.

Created Wyrn Events for Java 21 and Paper 1.21.4. It adds /startevent <eventName> <timerInSeconds> and /cancelevent, with configurable permissions, messages, sounds, and display formats.

The active event uses a protected item entity, a native floating TextDisplay hologram, and an animated bossbar. Claiming, cancellation, expiry, and plugin shutdown clean up the event displays and item.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
9 591
src/main/java/com/wyrn/events/WyrnEventsPlugin.java
package com.wyrn.events;

import com.wyrn.events.command.CancelEventCommand;
import com.wyrn.events.command.StartEventCommand;
import com.wyrn.events.listener.EventListener;
import com.wyrn.events.manager.EventManager;
import org.bukkit.Bukkit;
import org.bukkit.permissions.Permission;
import org.bukkit.permissions.PermissionDefault;
import org.bukkit.plugin.java.JavaPlugin;

public final class WyrnEventsPlugin extends JavaPlugin {
    private EventManager eventManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        registerConfiguredPermission("permissions.start", "wyrn.event.start");
        registerConfiguredPermission("permissions.cancel", "wyrn.event.cancel");

        eventManager = new EventManager(this);
        Bukkit.getPluginManager().registerEvents(new EventListener(eventManager), this);
        getCommand("startevent").setExecutor(new StartEventCommand(this, eventManager));
        getCommand("cancelevent").setExecutor(new CancelEventCommand(this, eventManager));
    }

    @Override
    public void onDisable() {
        if (eventManager != null) {
            eventManager.shutdown();
        }
    }

    private void registerConfiguredPermission(String path, String fallback) {
        String permission = getConfig().getString(path, fallback);
        if (permission != null && !permission.isBlank()
                && Bukkit.getPluginManager().getPermission(permission) == null) {
            Bukkit.getPluginManager().addPermission(new Permission(permission, PermissionDefault.OP));
        }
    }
}