Events Plugin
A lightweight, performance-optimized Minecraft plugin for managing live server events with countdowns, command execution, GUI display, and flexible admin tools. Built for 1.12.2 and 1.19.4 compatibility.
✅ Features
Player Features
- /events – Opens a dynamic, auto-updating GUI showing active events
- See time left before events trigger
- Custom icons, names, and lore for each event
- Real-time countdown updates while viewing GUI
Admin Commands
- /event add <name> <duration> <command>
- Supports abbreviated durations: 1d, 2h, 30m, 45s, or raw seconds (60)
- Sets default display name and lore
- /event remove <name> – Removes an event
- /event setname <name> <displayName...> – Changes display name
- /event setlore <name> <line1||line2...> – Changes item lore (supports %event_countdown% placeholder)
- /event setduration <name> <duration> – Changes duration and resets timer
- /event setitem <name> <item[:data]> – Changes the event's icon
- /event modifytime <name> [+|-]<duration> – Dynamically adjusts when an event will execute
- /event config reload – Reloads GUI config
- /event config settitle <title> – Changes GUI title
- /event config setborder <item[:data]> – Changes GUI border item
Tab Completion
- Smart suggestions for all subcommands and event names
- Auto-complete items, durations, and placeholder examples
Event Execution
- Executes configured command when countdown hits 0
- Reschedules based on duration
- Tracks nextDue timestamp in events.yml
GUI Behavior
- 3-row minimum inventory (27 slots)
- Dynamically scales by 7 usable slots per row (centered)
- Auto-updates every second while open
- Event items sorted top-to-bottom, left-to-right by soonest execution
- %event_countdown% placeholder in lore is live-updating
Configuration
config.yml
gui:
title: "&3Server Events"
border-item: "stained_glass_pane:7"
events.yml (auto-generated)
events:
boss_spawn:
duration: 3600
nextDue: 1712345678000
command: "say Boss has spawned!"
item: "diamond_sword"
name: "&cBoss Event"
lore:
- "&7&oEdit this with /event lore etc"
- "Time Left: %event_countdown%"
Developer API
✅ Initialization
EventsAPI.getTimeRemaining("event_name"); // returns seconds or -1
EventsAPI.getTimeRemainingFormatted("event_name"); // returns formatted string or "no such event"
Setup
Add this to your plugin's plugin.yml:
depend: [Events]
Build & Install
- Compile with Java 8 for 1.12.2 compatibility
- Place the jar in your plugins/ folder
- Start your server
- Edit config.yml and events.yml if needed
Future Plans
- Click-to-edit/remove events from GUI
- Pagination for 20+ events
- Player-specific visibility filters
- PlaceholderAPI support