|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bukkit.event.Event org.bukkit.event.entity.EntityEvent org.bukkit.event.entity.ProjectileHitEvent org.bukkit.event.entity.PotionSplashEvent
public class PotionSplashEvent
Called when a splash potion hits an area
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.bukkit.event.Event |
---|
Event.Result |
Field Summary |
---|
Fields inherited from class org.bukkit.event.entity.EntityEvent |
---|
entity |
Constructor Summary | |
---|---|
PotionSplashEvent(ThrownPotion potion,
Map<LivingEntity,Double> affectedEntities)
|
Method Summary | |
---|---|
Collection<LivingEntity> |
getAffectedEntities()
Retrieves a list of all effected entities |
ThrownPotion |
getEntity()
Returns the Entity involved in this event |
static HandlerList |
getHandlerList()
|
HandlerList |
getHandlers()
|
double |
getIntensity(LivingEntity entity)
Gets the intensity of the potion's effects for given entity; This depends on the distance to the impact center |
ThrownPotion |
getPotion()
Gets the potion which caused this event |
boolean |
isCancelled()
Gets the cancellation state of this event. |
void |
setCancelled(boolean cancel)
Sets the cancellation state of this event. |
void |
setIntensity(LivingEntity entity,
double intensity)
Overwrites the intensity for a given entity |
Methods inherited from class org.bukkit.event.entity.EntityEvent |
---|
getEntityType |
Methods inherited from class org.bukkit.event.Event |
---|
getEventName, isAsynchronous |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PotionSplashEvent(ThrownPotion potion, Map<LivingEntity,Double> affectedEntities)
Method Detail |
---|
public ThrownPotion getEntity()
EntityEvent
getEntity
in class ProjectileHitEvent
public ThrownPotion getPotion()
public Collection<LivingEntity> getAffectedEntities()
public double getIntensity(LivingEntity entity)
entity
- Which entity to get intensity for
public void setIntensity(LivingEntity entity, double intensity)
entity
- For which entity to define a new intensityintensity
- relative to maximum effectpublic boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this eventpublic HandlerList getHandlers()
getHandlers
in class ProjectileHitEvent
public static HandlerList getHandlerList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |