mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
Expand LingeringPotion API
This commit is contained in:
parent
a7e97b62c9
commit
450a42a3fe
1 changed files with 21 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue