Package io.papermc.paper.event.entity
Class WaterBottleSplashEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.ProjectileHitEvent
org.bukkit.event.entity.PotionSplashEvent
io.papermc.paper.event.entity.WaterBottleSplashEvent
- All Implemented Interfaces:
Cancellable
Called when a splash water potion "splashes" and affects
different entities in different ways.
-
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.PotionSplashEvent
affectedEntities
Fields inherited from class org.bukkit.event.entity.EntityEvent
entity
-
Constructor Summary
ConstructorDescriptionWaterBottleSplashEvent
(ThrownPotion potion, @Nullable Entity hitEntity, @Nullable Block hitBlock, @Nullable BlockFace hitFace, Map<LivingEntity, Double> affectedEntities, Set<LivingEntity> rehydrate, Set<LivingEntity> extinguish) -
Method Summary
Modifier and TypeMethodDescriptionvoid
damageAsWaterSensitive
(LivingEntity entity) Adds this entity to the group that will be damagedvoid
Removes this entity from the group that will be damaged.Deprecated.double
getIntensity
(LivingEntity entity) Deprecated.check ifgetToDamage()
contains an entityGets an immutable collection of entities that will take damage as a result of this event.Get a mutable collection of entities that will be extinguished as a result of this event.Get a mutable collection of entities that will be rehydrated by this.void
setIntensity
(LivingEntity entity, double intensity) Deprecated.usedamageAsWaterSensitive(LivingEntity)
ordoNotDamageAsWaterSensitive(LivingEntity)
to change which entities are damagedMethods inherited from class org.bukkit.event.entity.PotionSplashEvent
getEntity, getHandlerList, getHandlers, getPotion, isCancelled, setCancelled
Methods inherited from class org.bukkit.event.entity.ProjectileHitEvent
getHitBlock, getHitBlockFace, getHitEntity
Methods inherited from class org.bukkit.event.entity.EntityEvent
getEntityType
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
WaterBottleSplashEvent
@Internal public WaterBottleSplashEvent(ThrownPotion potion, @Nullable Entity hitEntity, @Nullable Block hitBlock, @Nullable BlockFace hitFace, Map<LivingEntity, Double> affectedEntities, Set<LivingEntity> rehydrate, Set<LivingEntity> extinguish)
-
-
Method Details
-
getToDamage
Gets an immutable collection of entities that will take damage as a result of this event. Use other methods on this class to modify which entities take damage.- Returns:
- an immutable collection of entities
- See Also:
-
doNotDamageAsWaterSensitive
Removes this entity from the group that will be damaged.- Parameters:
entity
- entity to remove
-
damageAsWaterSensitive
Adds this entity to the group that will be damaged- Parameters:
entity
- entity to add
-
getToRehydrate
Get a mutable collection of entities that will be rehydrated by this.As of 1.19.3 this only will contain Axolotls as they are the only entity type that can be rehydrated, but it may change in the future.
- Returns:
- the entities
-
getToExtinguish
Get a mutable collection of entities that will be extinguished as a result of this event.- Returns:
- entities to be extinguished
-
getAffectedEntities
Deprecated.UsegetToDamage()
Description copied from class:PotionSplashEvent
Retrieves a list of all effected entities- Overrides:
getAffectedEntities
in classPotionSplashEvent
- Returns:
- a confusing collection, don't use it
-
getIntensity
Deprecated.check ifgetToDamage()
contains an entityDoesn't make sense for this event as intensity doesn't vary.- Overrides:
getIntensity
in classPotionSplashEvent
- Parameters:
entity
- Which entity to get intensity for- Returns:
- a confusing value
-
setIntensity
Deprecated.usedamageAsWaterSensitive(LivingEntity)
ordoNotDamageAsWaterSensitive(LivingEntity)
to change which entities are damagedDoesn't make sense for this event as intensity doesn't vary.- Overrides:
setIntensity
in classPotionSplashEvent
- Parameters:
entity
- For which entity to define a new intensityintensity
- relative to maximum effect
-
getToDamage()