blob: dda37d6bf33a77feb26e9a1b01e2f9470caeaa64 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
package org.bukkit.event.entity;
import org.bukkit.entity.AreaEffectCloud;
import org.bukkit.entity.LingeringPotion;
import org.bukkit.entity.ThrownPotion;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
/**
* Called when a splash potion hits an area
*/
public class LingeringPotionSplashEvent extends ProjectileHitEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private boolean cancelled;
private final AreaEffectCloud entity;
public LingeringPotionSplashEvent(final ThrownPotion potion, final AreaEffectCloud entity) {
super(potion);
this.entity = entity;
}
@Override
public LingeringPotion getEntity() {
return (LingeringPotion) super.getEntity();
}
/**
* Gets the AreaEffectCloud spawned
*
* @return The spawned AreaEffectCloud
*/
public AreaEffectCloud getAreaEffectCloud() {
return entity;
}
public boolean isCancelled() {
return cancelled;
}
public void setCancelled(boolean cancel) {
cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
}
|