Search in sources :

Example 1 with AreaEffectCloud

use of org.bukkit.entity.AreaEffectCloud in project Denizen-For-Bukkit by DenizenScript.

the class LingeringPotionSplashScriptEvent method onLingeringPotionSplash.

@EventHandler
public void onLingeringPotionSplash(LingeringPotionSplashEvent event) {
    AreaEffectCloud cloud = event.getAreaEffectCloud();
    item = new dItem(event.getEntity().getItem());
    duration = new Element(cloud.getDuration());
    entity = new dEntity(event.getEntity());
    location = entity.getLocation();
    radius = new Element(cloud.getRadius());
    cancelled = event.isCancelled();
    this.event = event;
    fire();
    event.setCancelled(cancelled);
}
Also used : net.aufdemrand.denizen.objects.dItem(net.aufdemrand.denizen.objects.dItem) net.aufdemrand.denizen.objects.dEntity(net.aufdemrand.denizen.objects.dEntity) Element(net.aufdemrand.denizencore.objects.Element) AreaEffectCloud(org.bukkit.entity.AreaEffectCloud) EventHandler(org.bukkit.event.EventHandler)

Aggregations

net.aufdemrand.denizen.objects.dEntity (net.aufdemrand.denizen.objects.dEntity)1 net.aufdemrand.denizen.objects.dItem (net.aufdemrand.denizen.objects.dItem)1 Element (net.aufdemrand.denizencore.objects.Element)1 AreaEffectCloud (org.bukkit.entity.AreaEffectCloud)1 EventHandler (org.bukkit.event.EventHandler)1