Fix WaterBottleSplashEvent not forwarding hit result (#10203)

This commit is contained in:
Lulu13022002
2024-02-10 20:27:29 +01:00
parent a863590fd5
commit 9665ac3903
3 changed files with 51 additions and 7 deletions

View File

@@ -16,11 +16,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+import org.bukkit.block.Block;
+import org.bukkit.block.BlockFace;
+import org.bukkit.entity.Entity;
+import org.bukkit.entity.LivingEntity;
+import org.bukkit.entity.ThrownPotion;
+import org.bukkit.event.entity.PotionSplashEvent;
+import org.jetbrains.annotations.ApiStatus;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.Unmodifiable;
+
+/**
@@ -35,11 +39,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ @ApiStatus.Internal
+ public WaterBottleSplashEvent(
+ final @NotNull ThrownPotion potion,
+ final @Nullable Entity hitEntity,
+ final @Nullable Block hitBlock,
+ final @Nullable BlockFace hitFace,
+ final @NotNull Map<LivingEntity, Double> affectedEntities,
+ final @NotNull Set<LivingEntity> rehydrate,
+ final @NotNull Set<LivingEntity> extinguish
+ ) {
+ super(potion, affectedEntities);
+ super(potion, hitEntity, hitBlock, hitFace, affectedEntities);
+ this.rehydrate = rehydrate;
+ this.extinguish = extinguish;
+ }