Extra Events
Anyone who has been active on the main forums in the last few days must surely have already heard the news.
I'm not going to comment on why and how, but the short version is that Bukkit is almost certainly not getting passed this.
Consequently, the future of BukkitDev is very uncertain. Even if the legal matters were resolved tomorrow there isn't really anybody left to deal with file submissions anyway. There's no indication about how long the site will stay up and what will happen to the files.
Anyway, while I will continue updating and developing my plugins you will need to look for updates somewhere else, namely the wiki. I will be updating this wiki in the next few days to facilitate better communication (forums, email, etc.) and adding any documentation that's missing.
I will also, of course, be looking into porting the plugins over to whichever API emerges from the ashes!
Extra Events
This is a plugin to easily allow devs to add some extra events not found in Bukkit
Time Events
- HourChangeEvent
- Called every Minecraft hour
- Members - hour
- SecondTickEvent
- Called every real life second
- DawnEvent
- Called when the Minecraft time is 0
- MiddayEvent
- Called when the Minecraft time is 6000
- DuskEvent
- Called when the Minecraft time is 12000
- NightEvent
- Called when the Minecraft time is 12500
- MidnightEvent
- Called when the Minecraft time is 18000
- TimerActivateEvent
- Called when a timer goes off (see below)
- Members - timer
Area Events
- PlayerEnterAreaEvent
- Called when a player enters an area (either WorldGuard region or Area)
- Members - player, area
- PlayerLeaveAreaEvent
- Called when a player leaves an area (either WorldGuard region or Area)
- Members - player, area
- PlayerInAreaEvent
- Called every half a second a player is inside an area (either WorldGuard region or Area)
- Members - player, area
Entity Events
- LivingEntityBlockEvent
- Called when a LivingEntity is hit whilst invincible
- Members - entity, attacker, cause
- LivingEntityDamageEvent
- Called when a LivingEntity is hit and not invincible
- Members - entity, attacker, cause, damage
- PlayerApproachLivingEntityEvent
- Called when a Player gets near a LivingEntity
- Members - entity, player
- The range is customizable (see below)
- PlayerLeaveLivingEntityEvent
- Called when a Player moves away from a LivingEntity
- Members - entity, player
- The range is customizable (see below)
- PlayerNearLivingEntityEvent
- Called every half a second when a Player is near a LivingEntity
- Members - entity, player
- The range is customizable (see below)
- PlayerTargetedEvent
- Called when a hostile mob targets a player
- Members - entity,player, reason
Timers
It's possible to set up events to be fired every x seconds. See below or in the config file for an example.
If you're a Mobs user you can set timers here and use the timer.txt event file to react to them. Use the if_timer condition to check the timer's name if you have more than one.
Config
approach: x: 10 y: 4 z: 10 leave: x: 10 y: 4 z: 10 near: x: 5 y: 4 z: 5 areas: world_name: area_name: x: from: 10 to: 20 y: from: 55 to: 58 z: from: 100 to: 120 timers: example: interval_in_seconds: 300 enabled: no world: world_name
These are the defaults for the entity events.
The top section controls how close a Player must be to a LivingEntity to call the PlayerApproachLivingEntityEvent.
The middle section controls how close a Player must be to a LivingEntity to call the PlayerLeaveLivingEntityEvent.
The bottom section controls how close a Player must be to a LivingEntity to call the PlayerNearLivingEntityEvent.
The middle section deals with areas. Use this to add areas without needing WorldGuard. The areas are only markers for convenience and don't offer any protection, owners, etc.
The last section deals with timers. Each timer needs a unique name ('example' above), and a valid world name or it will be disabled. You can control the timers from in game with the /timers command (see below).
Commands
- /reload_extraevents, or /ree
- Reloads the config without reloading the server.
- Needs the permission extraevents.can_reload_config, or op.
- /timers, or /t
- Allows timers to be disabled, paused, etc.
- Needs the permission extraevents.can_change_timers, or op.
- /timers
- Shows a report of the current status.
- /timers pause
- Stops the plugin from activating any timers automatically.
- /timers unpause
- Reverses the above.
- /timers enable
- Enables all timers.
- /timers enable [name]
- Enables the timer called [name].
- /timers disable
- Disables all timers.
- /timers disable [name]
- Disables the timer called [name].
- /timers activate
- Activates all timers, as if they had reached 0.
- /timers activate [name]
- Activates the timer called [name], as if it had reached 0.
- /timers check
- Shows a report of all timers.
- /timers check [name]
- Shows a report of the timer called [name].
- /timers set_interval x
- Sets the interval of all timers to x.
- /timers set_interval x [name]
- Sets the interval of the timer called [name] to x.
Note that none of these commands changes the config itself, so all timers will be reset to their original values after reloading.
How To Use
Add this plugin to the project in exactly the same way as you add Bukkit, and use the events in the same way as normal Bukkit events.
Donate
Plugins take a lot of time to maintain, and Pepsi Max helps me think. So if your server enjoys the effects of this plugin please consider sending some Pepsi Max my way!
If you're penniless or like the plugin but not that much I'm also partial to TF2 items. Send any you don't want my way! STEAM id: coldandtired
If you don't know what TF2 is, then start playing! It's free and fun!

-
View User Profile
-
Send Message
Posted Jul 31, 2013<<reply 1677733="">>
It looks like I removed that and now getArea() always returns an area, with the min/max/world/name imported from the ProtectedRegion.
-
View User Profile
-
Send Message
Posted Jul 31, 2013@coldandtired
Hi, how can i do this
in new version of your plugin because its not working anymore. Thx
-
View User Profile
-
Send Message
Posted May 9, 2013@dexyh1234 It's from the example I left in the config. I'll move it into comments instead.
-
View User Profile
-
Send Message
Posted May 9, 2013It's not a big problem or anything, but my server warns for an unknown world inside the example timer. When I delete the example it auto-replaces it on startup :)..
-
View User Profile
-
Send Message
Posted Mar 12, 2013This plugin with JSONAPI support would be most awesome. Streaming subscriptions!
-
View User Profile
-
Send Message
Posted Jan 4, 2013I am having a bug with this plugin conflicting with another plugin.
The other plugin turns enderpearls into grenades, by blocking the teleportation event where the pearl lands, and spawning an explosion with createExplosion().
However, if the pearl hits a mob directly, and the explosion is subsequently centered directly on them, the mob takes no damage.
It is confirmed to be caused by this plugin. I use mobs which requires this, but even without mobs this problem is caused, and without extra_events, the issue does not occur. I am on CB 1.4.6R0.3 and the latest version of extra_events.
-
View User Profile
-
Send Message
Posted Dec 30, 2012@coldandtired Ok thank you very much. I'll use it for handle own Portals plugin ;)
-
View User Profile
-
Send Message
Posted Dec 30, 2012@sgcsim You need to do something like this inside the event listener:
-
View User Profile
-
Send Message
Posted Dec 30, 2012@coldandtired I know but i always get an long class with id but no worldguard region name ...
-
View User Profile
-
Send Message
Posted Dec 30, 2012@sgcsim It's already there. The area events have an Area object, which is either my area or a WorlgGuard region. Check which it is and then cast as appropriate.
-
View User Profile
-
Send Message
Posted Dec 30, 2012@nhadobas I'm planning to. For now you can use LivingEntityDamageEvent and check if the attacker is not null.
-
View User Profile
-
Send Message
Posted Dec 29, 2012Hi, can you add to PlayerEnterAreaEvent way to get event.getRegionName() ????
-
View User Profile
-
Send Message
Posted Dec 26, 2012Could you add a LivingEntityDealsDamageEvent?
-
View User Profile
-
Send Message
Posted Nov 29, 2012This seems useful. :) Might use it for a plugin!
-
View User Profile
-
Send Message
Posted Nov 26, 20121.4.5 b2 is up
-
View User Profile
-
Send Message
Posted Nov 23, 20121.4.5 b1 is up (new version numbering).
Check the changelog for details.
-
View User Profile
-
Send Message
Posted Nov 22, 2012Could you add an "HitByEnderpearlEvent" or something like this?
-
View User Profile
-
Send Message
Posted Nov 21, 20121.2 is up.
Fixed the damage event not passing its values back to the original event.
-
View User Profile
-
Send Message
Posted Nov 16, 2012This is a great plugin.Thanks!
-
View User Profile
-
Send Message
Posted Nov 16, 20121.1 is up.
Added three new events dealing with players entering, leaving, or staying inside WorldGuard regions.