Home›Java›Mods›WGRegionEvents Continued
ModsJava

WGRegionEvents Continued

Minecraft Java mod. Downloads from the MC Java Mods app on Android.

⬇ Download on Spigot
Does your plugin do something when a player enters or exists a region? Are you wanting to use a plugin that depends on WGRegionEvents?

This is a continuation of the helpful API WGRegionEvents. It has been updated to Java 7, Spigot 1.8.8, and WorldGuard 6.1.

I would like to give credit to the original developer for his original API. He wrote it very well. The project has since been abandoned, so I chose to take it over. The original project can be found here: http://dev.bukkit.org/bukkit-plugins/worldguard-region-events/

Example (derived from original post):
Code (Text):
import com.mewin.WGRegionEvents.events.RegionEnterEvent;
...

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

//Or to stop players from escaping jail:

import com.mewin.WGRegionEvents.events.RegionLeaveEvent;
...

@EventHandler(priority = EventPriority.NORMAL)
public void onRegionLeave(RegionLeaveEvent e){
    if (e.getRegion().getId().equals("jail") && e.isCancellable()){ //You cannot cancel a region change if the player spawned (eg died) or disconnected.
        e.setCancelled(true);
        e.getPlayer().sendMessage("You cannot leave the jail!");
    }
}

 


What has been done:
Let me know if you find any bugs! I will try to get to them as soon as possible. Thank you. If you need to contact me desperately, add me on Skype ( spencer.ryan.c).

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

WGRegionEvents Continued is a free Minecraft Java mod. Downloaded 9,508 times (via Spigot). Download it and open it directly in the game.

Explore more