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!
Facts
- Date created
- Nov 12, 2012
- Categories
- Last update
- May 12, 2013
- Development stage
- Release
- Language
- enUS
- License
- All Rights Reserved
- Curse link
- Extra Events
- Downloads
- 1,762
- Recent files

- Reply
- #21
coldandtired May 09, 2013 at 18:40 UTC - 0 likes@dexyh1234: Go It's from the example I left in the config. I'll move it into comments instead.
- Reply
- #20
dexyh1234 May 09, 2013 at 14:22 UTC - 0 likesIt'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 :)..
- Reply
- #18
NodexServers Mar 13, 2013 at 06:40 UTC - 0 likesThis plugin with JSONAPI support would be most awesome. Streaming subscriptions!
- Reply
- #17
Archonea Jan 04, 2013 at 18:44 UTC - 0 likesI 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.
- Reply
- #16
sgcsim Dec 31, 2012 at 03:56 UTC - 0 likes@coldandtired: Go Ok thank you very much. I'll use it for handle own Portals plugin ;)
- Reply
- #15
coldandtired Dec 30, 2012 at 20:46 UTC - 0 likes@sgcsim: Go You need to do something like this inside the event listener:
- Reply
- #14
sgcsim Dec 30, 2012 at 20:38 UTC - 0 likes@coldandtired: Go I know but i always get an long class with id but no worldguard region name ...
- Reply
- #13
coldandtired Dec 30, 2012 at 11:29 UTC - 0 likes@sgcsim: Go 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.
- Reply
- #12
coldandtired Dec 30, 2012 at 11:28 UTC - 0 likes@nhadobas: Go I'm planning to. For now you can use LivingEntityDamageEvent and check if the attacker is not null.
- Reply
- #11
sgcsim Dec 30, 2012 at 04:02 UTC - 0 likesHi, can you add to PlayerEnterAreaEvent way to get event.getRegionName() ????