mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +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 static final HandlerList handlers = new HandlerList();
|
||||||
private boolean cancelled;
|
private boolean cancelled;
|
||||||
private final AreaEffectCloud entity;
|
private final AreaEffectCloud entity;
|
||||||
|
private boolean allowEmptyAreaEffectCreation; // Paper
|
||||||
|
|
||||||
@Deprecated(since = "1.20.2")
|
@Deprecated(since = "1.20.2")
|
||||||
public LingeringPotionSplashEvent(@NotNull final ThrownPotion potion, @NotNull final AreaEffectCloud entity) {
|
public LingeringPotionSplashEvent(@NotNull final ThrownPotion potion, @NotNull final AreaEffectCloud entity) {
|
||||||
|
@ -44,6 +45,26 @@ public class LingeringPotionSplashEvent extends ProjectileHitEvent implements Ca
|
||||||
return entity;
|
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
|
@Override
|
||||||
public boolean isCancelled() {
|
public boolean isCancelled() {
|
||||||
return cancelled;
|
return cancelled;
|
||||||
|
|
Loading…
Reference in a new issue