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`

public class WaterBottleSplashEvent extends PotionSplashEvent
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

Constructors
Constructor
Description
`WaterBottleSplashEvent(@NotNull ThrownPotion potion, @NotNull Map<LivingEntity,Double> affectedEntities, @NotNull Set<LivingEntity> rehydrate, @NotNull Set<LivingEntity> extinguish)`

## Method Summary

Modifier and Type
Method
Description
`void`
`damageAsWaterSensitive(@NotNull LivingEntity entity)`
Adds this entity to the group that will be damaged
`void`
`doNotDamageAsWaterSensitive(@NotNull LivingEntity entity)`
Removes this entity from the group that will be damaged.
`@NotNull Collection<LivingEntity>`
`getAffectedEntities()`
Deprecated.
Use `getToDamage()`
`double`
`getIntensity(@NotNull LivingEntity entity)`
Deprecated.
check if `getToDamage()` contains an entity
`@NotNull @Unmodifiable Collection<LivingEntity>`
`getToDamage()`
Gets an immutable collection of entities that will take damage as a result of this event.
`@NotNull Collection<LivingEntity>`
`getToExtinguish()`
Get a mutable collection of entities that will be extinguished as a result of this event.
`@NotNull Collection<LivingEntity>`
`getToRehydrate()`
Get a mutable collection of entities that will be rehydrated by this.
`void`
`setIntensity(@NotNull LivingEntity entity, double intensity)`
Deprecated.
use `damageAsWaterSensitive(LivingEntity)` or `doNotDamageAsWaterSensitive(LivingEntity)` to change which entities are damaged

### Methods 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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### WaterBottleSplashEvent

public WaterBottleSplashEvent(@NotNull @NotNull ThrownPotion potion, @NotNull @NotNull Map<LivingEntity,Double> affectedEntities, @NotNull @NotNull Set<LivingEntity> rehydrate, @NotNull @NotNull Set<LivingEntity> extinguish)

## Method Details

### getToDamage

@NotNull public @NotNull @Unmodifiable Collection<LivingEntity> 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(LivingEntity)`
  - `damageAsWaterSensitive(LivingEntity)`

### doNotDamageAsWaterSensitive

public void doNotDamageAsWaterSensitive(@NotNull @NotNull LivingEntity entity)
Removes this entity from the group that will be damaged.

Parameters:
  `entity` - entity to remove

### damageAsWaterSensitive

public void damageAsWaterSensitive(@NotNull @NotNull LivingEntity entity)
Adds this entity to the group that will be damaged

Parameters:
  `entity` - entity to add

### getToRehydrate

@NotNull public @NotNull Collection<LivingEntity> 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

@NotNull public @NotNull Collection<LivingEntity> getToExtinguish()
Get a mutable collection of entities that will be extinguished as a result of this event.

Returns:
  entities to be extinguished

### getAffectedEntities

@Deprecated @NotNull public @NotNull Collection<LivingEntity> getAffectedEntities()
Deprecated.
Use `getToDamage()`
Description copied from class: `PotionSplashEvent`
Retrieves a list of all effected entities

Overrides:
  `getAffectedEntities` in class `PotionSplashEvent`
Returns:
  a confusing collection, don't use it

### getIntensity

@Deprecated public double getIntensity(@NotNull @NotNull LivingEntity entity)
Deprecated.
check if `getToDamage()` contains an entity
Doesn't make sense for this event as intensity doesn't vary.

Overrides:
  `getIntensity` in class `PotionSplashEvent`
Parameters:
  `entity` - Which entity to get intensity for
Returns:
  a confusing value

### setIntensity

@Deprecated public void setIntensity(@NotNull @NotNull LivingEntity entity, double intensity)
Deprecated.
use `damageAsWaterSensitive(LivingEntity)` or `doNotDamageAsWaterSensitive(LivingEntity)` to change which entities are damaged
Doesn't make sense for this event as intensity doesn't vary.

Overrides:
  `setIntensity` in class `PotionSplashEvent`
Parameters:
  `entity` - For which entity to define a new intensity
  `intensity` - relative to maximum effect