Package com.ranull.graves.listener
Class ExplosionPrimeListener
java.lang.Object
com.ranull.graves.listener.ExplosionPrimeListener
- All Implemented Interfaces:
org.bukkit.event.Listener
Listens for ExplosionPrimeEvent to notify when an explosion will affect graves.
Fires a GravePreExplodeEvent once for each grave that will be inside the blast radius.
Listeners of GravePreExplodeEvent can:
- Cancel the event to cancel the explosion entirely.
- Modify the explosion radius.
- Modify the explosion location/world.
Any changes to radius/location/world are propagated back to the original ExplosionPrimeEvent and the source entity.
-
Constructor Summary
ConstructorsConstructorDescriptionExplosionPrimeListener(Graves plugin) Constructs a new ExplosionPrimeListener with the specified Graves plugin. -
Method Summary
Modifier and TypeMethodDescriptionvoidonExplosionPrime(org.bukkit.event.entity.ExplosionPrimeEvent event) Handles ExplosionPrimeEvent to notify when an explosion will affect graves.
-
Constructor Details
-
ExplosionPrimeListener
Constructs a new ExplosionPrimeListener with the specified Graves plugin.- Parameters:
plugin- The Graves plugin instance.
-
-
Method Details
-
onExplosionPrime
public void onExplosionPrime(org.bukkit.event.entity.ExplosionPrimeEvent event) Handles ExplosionPrimeEvent to notify when an explosion will affect graves.- Parameters:
event- The ExplosionPrimeEvent to handle.
-