package com.elmakers.mine.bukkit.api.effect;

import com.elmakers.mine.bukkit.api.action.CastContext;
import org.bukkit.Color;
import org.bukkit.Effect;
import org.bukkit.Location;
import org.bukkit.Sound;
import org.bukkit.block.Block;

import com.elmakers.mine.bukkit.api.block.MaterialAndData;
import org.bukkit.entity.Entity;

import java.util.Collection;
import java.util.Map;

public interface EffectPlayer {
    void setEffectPlayList(Collection<EffectPlay> plays);
    void setEffect(Effect effect);
    void setEffectData(int data);
    void setScale(float scale);

    void setSound(Sound sound);
    void setSound(Sound sound, float volume, float pitch);
    void setParameterMap(Map<String, String> parameters);

    void setDelayTicks(int ticks);

    void setParticleOverride(String particleType);
    void setMaterial(MaterialAndData material);
    void setMaterial(Block block);
    void setColor(Color color);
    boolean shouldUseHitLocation();
    boolean shouldUseWandLocation();
    boolean shouldUseCastLocation();
    boolean shouldUseEyeLocation();
    boolean shouldUseBlockLocation();
    Location getSourceLocation(CastContext context);

    boolean playsAtOrigin();
    boolean playsAtTarget();
    boolean playsAtAllTargets();

    void start(Location origin, Location target);
    void start(Entity origin, Entity target);
    void start(Location origin, Entity originEntity, Location target, Entity targetEntity);
    void start(Location origin, Entity originEntity, Location target, Entity targetEntity, Collection<Entity> targets);
}

@@ -928,185 +928,54 @@
     
-boolean shouldUseHitLocation();%0A    boolean shouldUseWandLocation();%0A    boolean shouldUseCastLocation();%0A    boolean shouldUseEyeLocation();%0A    boolean shouldUseBlockLocation(
+Location getSourceLocation(CastContext context
 );%0A 
@@ -981,38 +981,38 @@
     Location get
-Source
+Target
 Location(CastCon
@@ -1426,11 +1426,256 @@
 argets);
+%0A%0A    @Deprecated boolean shouldUseHitLocation();%0A    @Deprecated boolean shouldUseWandLocation();%0A    @Deprecated boolean shouldUseCastLocation();%0A    @Deprecated boolean shouldUseEyeLocation();%0A    @Deprecated boolean shouldUseBlockLocation();
 %0A%7D%0A

Add EffectPlayer.getTargetLocation, deprecate all shouldUse options.