WorldGuard Region Events
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!"); } }
-
View User Profile
-
Send Message
Posted Sep 10, 2013Still waiting for a reply please :)
-
View User Profile
-
Send Message
Posted Aug 24, 2013@der_mewin
Any idea what would be causing this issue then?
-
View User Profile
-
Send Message
Posted Aug 23, 2013@AnorZaken
I had to move to another hoster, you can find the javadoc on http://mewin.bplaced.net/javadoc now.
-
View User Profile
-
Send Message
Posted Aug 22, 2013Um, is the javadoc temporarily offline or is there some bigger issue?
-
View User Profile
-
Send Message
Posted Aug 18, 2013When this plugin is installed, the syncChunkLoad timings go insane. Check the timings report here. When i remove WGRegionEvents, all is normal.
-
View User Profile
-
Send Message
Posted Aug 14, 2013ummmm, no folder or configure file was generated, the plugin shows in the /plugins menu, but no help available.
-
View User Profile
-
Send Message
Posted Aug 10, 2013Hi,
I'm using The latest CraftBukkit Beta build and Minecraft 1.6.2, and when i installed this plugin (It's required for RegionJukebox) the plugin did not generate any config file in the plugins folder, it didn't show up when I typed /help, and it has no commands for it appearing. I am using the latest version of this plugin, Bukkit, and Minecraft.
If anyone can, please tell me what I'm doing wrong, or how I can fix this.
-
View User Profile
-
Send Message
Posted Aug 2, 2013@rtainc
Thank you :)
-
View User Profile
-
Send Message
Posted Aug 1, 2013Why do all you people HAVE to have an updated version?! Why not test it and see that it works PERFECT FINE with 1.6.2?
-
View User Profile
-
Send Message
Posted Jul 17, 2013Please 1.6.2 ! Thanks
-
View User Profile
-
Send Message
Posted Jul 2, 2013Please update this amazing plugin to Bukkit 1.6.1!
Thanks! :)
-
View User Profile
-
Send Message
Posted Jun 5, 2013@wbmasterchief
Does WorldGuard work correctly?
-
View User Profile
-
Send Message
Posted Jun 4, 2013What?
14:02:42 [SEVERE] Could not load 'plugins\WGRegionEvents.jar' in folder 'plugins' org.bukkit.plugin.UnknownDependencyException: WorldGuard at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:195) at org.bukkit.craftbukkit.v1_5_R3.CraftServer.loadPlugins(CraftServer.java:239) at org.bukkit.craftbukkit.v1_5_R3.CraftServer.<init(CraftServer.java:217) at net.minecraft.server.v1_5_R3.PlayerList.<init(PlayerList.java:55) at net.minecraft.server.v1_5_R3.DedicatedPlayerList.<init(SourceFile:11) at net.minecraft.server.v1_5_R3.DedicatedServer.init(DedicatedServer.java:106) at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:382) at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)
-
View User Profile
-
Send Message
Posted Apr 24, 2013Works all fine, why he should update?
-
View User Profile
-
Send Message
Posted Apr 2, 2013Please, update this plugin ! :'(
-
View User Profile
-
Send Message
Posted Mar 4, 2013I am using Spigot (which is built off of bukkit) and I guess this plugin isn't functional with it? it keeps locking up the server. Is there any way you could fix this?
Or is it TagAPI causing the issues?
-
View User Profile
-
Send Message
Posted Feb 18, 2013@daancrafter1234
Could you please add a smaller picture? :)
-
View User Profile
-
Send Message
Posted Feb 18, 2013@der_mewin
Thank you very much sir. Like your creations on bukkit.org *Respect*
-
View User Profile
-
Send Message
Posted Feb 18, 2013@daancrafter1234
You have to add WorldGuard and WorldEdit as libraries, too. Then you have to import ProtectedRegion.
-
View User Profile
-
Send Message
Posted Feb 18, 2013In the RegionLeaveEvent example i see "e.getRegion().getId()", but when i try to type .getId() it doesn't do anything but giving me an error: "The method getRegion() from the type RegionEvent refers to the missing type ProtectedRegion". Anyone got a solution? thank you