Mineuniverse
Log in Register
Plugins

WorldGuard Region Events

adds events for entering and leaving WorldGuard regions to Bukkit
by _ForgeUser9768154
Download Claim this project
49,231 downloads
0 likes
Updated Jun 30, 2026
0 hypes
Developer Tools

Description

WorldGuard Region Events allows modders to trigger function if a player enters or leaves a region. It adds four events that you can use to trigger your functions: RegionEnterEvent, RegionEnteredEvent, RegionLeaveEvent and RegionLeftEvent. They can be used just as any other Bukkit event (for more information look here .)

The RegionEnteredEvent and RegionLeftEvent are triggered a short time after a player entered/left a region so you cannot cancel them, but use the to check the flags of the regions the player is in.

The JavaDoc of WGRegionEvents can be found here.

Example

If you don't want to create a plugin ignore this

To send a player a text whenever he enters a region:

import com.mewin.WGRegionEvents.events.RegionEnterEvent;
...

@EventHandler
public void onRegionEnter(RegionEnterEvent e)
{
  e.getPlayer().sendMessage("You just entered " + e.getRegion().getId());
}

Or to quit players from escaping from jail:

import com.mewin.WGRegionEvents.events.RegionLeaveEvent
...
@EventHandler
public void onRegionLeave(RegionLeaveEvent e)
{
  if (e.getRegion().getId().equals("jail") && e.isCancellable()) // you cannot cancel the event if the player left the region because he died
  {
    e.setCancelled(true);
    e.getPlayer().sendMessage("You cannot leave the jail!");
  }
}
WorldGuard Region Events 1.2.1
MC 1.9
Release 2016-04-27 Get
WorldGuard Region Events 1.2
MC 1.4.7, CB 1.4.7-R1.0, CB 1.4.7-R0.1
Release 2013-02-01 Get
WorldGuard Region Events 1.1
MC CB 1.3.2-R3.0, CB 1.4.2-R0.2, CB 1.4.5-R0.1
Release 2012-11-20 Get
WorldGuard Region Events 1.0
MC CB 1.3.2-R2.0, CB 1.3.2-R0.2, CB 1.3.2-R1.0
Beta 2012-10-19 Get

More from _ForgeUser9768154

WorldGuard Custom Flags
97,851
WorldGuard MobDamageFlags
8,496
Mc Kill Rewards
6,161
WorldGuard Resource Pack Flag
5,153
WorldGuard Explosion Flags
4,989
WorldGuard Region Effects
41,370

You Might Also Like

WorldGuard Custom Flags
WorldGuard Custom Flags
97,851
HoloAPI
Advanced and powerful holographic displays
93,959
Minequery
Minequery
91,099
SQLibrary
SQLibrary aims to streamline driver wrappers in Java for every database engine
85,675
WolfyUtilities
Utils and APIs: Config, Language and Inventory API, Protection Utils: WorldGuard, LWC, PlotSquared
84,728
DisguiseTester
Experiment with disguises!
9,677