13
0
geforkt von Mirrors/Paper

Expand LingeringPotion API

Dieser Commit ist enthalten in:
Tamion 2023-11-04 23:56:23 +01:00
Ursprung a7e97b62c9
Commit 450a42a3fe

Datei anzeigen

@ -17,6 +17,7 @@ public class LingeringPotionSplashEvent extends ProjectileHitEvent implements Ca
private static final HandlerList handlers = new HandlerList();
private boolean cancelled;
private final AreaEffectCloud entity;
private boolean allowEmptyAreaEffectCreation; // Paper
@Deprecated(since = "1.20.2")
public LingeringPotionSplashEvent(@NotNull final ThrownPotion potion, @NotNull final AreaEffectCloud entity) {
@ -44,6 +45,26 @@ public class LingeringPotionSplashEvent extends ProjectileHitEvent implements Ca
return entity;
}
// Paper start
/**
* Sets if an Empty AreaEffectCloud may be created
*
* @param allowEmptyAreaEffectCreation If an Empty AreaEffectCloud may be created
*/
public void allowsEmptyCreation(boolean allowEmptyAreaEffectCreation) {
this.allowEmptyAreaEffectCreation = allowEmptyAreaEffectCreation;
}
/**
* Gets if an empty AreaEffectCloud may be created
*
* @return if an empty AreaEffectCloud may be created
*/
public boolean allowsEmptyCreation() {
return allowEmptyAreaEffectCreation;
}
// Paper end
@Override
public boolean isCancelled() {
return cancelled;