Unlocking Advanced Minecraft Events with the Extra Events Plugin
Server administrators and plugin developers know that the default Bukkit event system covers a lot of ground, but sometimes you need more granular control over what happens in your Minecraft world. That’s where the Extra Events plugin steps in. Originally shared on the BukkitDev forums before the platform’s uncertain future, this plugin introduces a suite of custom events that go beyond the standard API. Whether you want to track time changes down to the hour, react when a player enters a specific zone, or build intricate timer-based mechanics, Extra Events gives you the hooks you need.
Time Events That Tick With Your World
Minecraft’s day-night cycle is iconic, but the built-in events only fire at a few key moments. Extra Events expands this dramatically. You can listen for:
- HourChangeEvent – triggers every in-game hour, passing the current hour as a member.
- SecondTickEvent – fires every real-life second, perfect for precise timing.
- DawnEvent – called when the time reaches 0 (sunrise).
- MiddayEvent – triggers at time 6000.
- DuskEvent – fires at time 12000 (sunset).
- NightEvent – called at time 12500, when mobs start spawning.
- MidnightEvent – triggers at time 18000.
These events let you schedule server tasks, change mob behavior, or send chat reminders without relying on clunky repeating tasks. For example, a survival server might use HourChangeEvent to broadcast a status update every Minecraft hour, while a minigame could use SecondTickEvent to drive a countdown timer.
Area Events for Custom Zones
WorldGuard regions are a staple of server protection, but Extra Events adds three powerful events that fire when players interact with areas. You can also define custom areas directly in the plugin’s configuration, no WorldGuard required. The events include:
- PlayerEnterAreaEvent – fires when a player steps into a defined area or WorldGuard region.
- PlayerLeaveAreaEvent – triggers when a player exits the zone.
- PlayerInAreaEvent – called every half second while a player remains inside the area.
Each event provides the player and the area object, making it simple to apply potion effects, change game modes, or display titles. The configuration lets you set up areas with coordinates like this:
areas:
world_name:
area_name:
x:
from: 10
to: 20
y:
from: 55
to: 58
z:
from: 100
to: 120
These areas are purely markers for event logic—they don’t add protection or ownership—so they’re ideal for adventure maps, quest hubs, or PvP zones.
Entity Events for Smarter Mobs
Tracking player-mob interactions becomes far more flexible with the entity events. You can detect when a player gets close to a living entity, when they move away, and even when a hostile mob targets them. The key events are:
- LivingEntityBlockEvent – called when a living entity is hit while invincible (e.g., during a damage cooldown).
- LivingEntityDamageEvent – fires when a living entity is hit and not invincible, including the damage amount.
- PlayerApproachLivingEntityEvent – triggers when a player enters a configurable range of an entity.
- PlayerLeaveLivingEntityEvent – fires when a player moves out of that range.
- PlayerNearLivingEntityEvent – called every half second while a player stays within range.
- PlayerTargetedEvent – activates when a hostile mob targets a player, with the reason included.
The approach and leave ranges are fully customizable in the config, so you can fine-tune how close players need to be. For instance, a stealth-based server might use PlayerNearLivingEntityEvent to reveal a hidden player if they get too close to a guard villager.
Timers: Event-Driven Automation
One of the most versatile features is the timer system. You can define named timers that fire a TimerActivateEvent at regular intervals, all configurable in seconds. A sample timer setup looks like this:
timers:
example:
interval_in_seconds: 300
enabled: no
world: world_name
Each timer must be assigned to a valid world, or it stays disabled. If you’re using the Mobs plugin, you can even link timers to its event files and use the if_timer condition to react to specific timers. The in-game /timers command gives you full control—pause, enable, disable, or manually activate timers without reloading the server. For example, /timers set_interval 600 changes all timers to a 10-minute cycle, while /timers enable my_timer turns on a specific one. Note that these changes are temporary; a reload resets timers to the config values.
Getting the plugin onto your server is straightforward. You add the JAR to your plugins folder like any other Bukkit plugin. For those who prefer a more streamlined approach, the foxygame.net launcher offers a convenient, flexible, and modern Minecraft launcher where you can download mods right from the menu. This makes installing and managing plugins like Extra Events a breeze, especially when juggling multiple server setups. Once installed, developers can reference the plugin in their projects just as they would Bukkit itself, then listen for the custom events in their code.
Commands and Permissions at a Glance
Two main commands keep everything under control:
- /reload_extraevents (or /ree) – reloads the configuration without restarting the server. Requires the extraevents.can_reload_config permission or operator status.
- /timers (or /t) – manages all timer states. Subcommands include pause, unpause, enable, disable, activate, check, and set_interval. Needs extraevents.can_change_timers or op.
Using /timers check gives you a full status report, and you can target individual timers by name. This level of control means you can debug event-driven mechanics without ever touching the config file mid-game.
Bringing It All Together
Extra Events fills the gaps left by the standard Bukkit API, empowering developers to craft more responsive and immersive Minecraft servers. From granular time tracking to area-based triggers and entity proximity detection, the plugin’s event set opens up countless possibilities for minigames, roleplay, and automation. While the original BukkitDev page may no longer be the primary distribution hub, the plugin’s wiki remains the go-to resource for updates and documentation. If you’ve been looking for a way to make your server react to the world in finer detail, Extra Events is a tool that deserves a spot in your plugins folder.