IceBlast get and set

This commit is contained in:
Nathan Braun 2015-01-02 20:26:26 -08:00
parent fa18bddf4c
commit 0817b222a9

View file

@ -23,7 +23,7 @@ import com.projectkorra.ProjectKorra.Utilities.ParticleEffect;
public class IceBlast {
public static ConcurrentHashMap<Integer, IceBlast> instances = new ConcurrentHashMap<Integer, IceBlast>();
private static double RANGE = ProjectKorra.plugin.getConfig().getDouble("Abilities.Water.IceBlast.Range");
private static double defaultrange = ProjectKorra.plugin.getConfig().getDouble("Abilities.Water.IceBlast.Range");
private static int DAMAGE = ProjectKorra.plugin.getConfig().getInt("Abilities.Water.IceBlast.Damage");
private static int ID = Integer.MIN_VALUE;
@ -44,7 +44,6 @@ public class IceBlast {
private Block sourceblock;
private Player player;
private TempBlock source;
private double defaultrange = RANGE;
private double defaultdamage = DAMAGE;
public IceBlast(Player player) {
@ -113,7 +112,7 @@ public class IceBlast {
Location location = player.getEyeLocation();
Vector vector = location.getDirection();
Location mloc = ice.location;
if (mloc.distance(location) <= RANGE
if (mloc.distance(location) <= defaultrange
&& Methods.getDistanceFromLine(vector, location, ice.location) < deflectrange
&& mloc.distance(location.clone().add(vector)) <
mloc.distance(location.clone().add(vector.clone().multiply(-1)))) {
@ -321,18 +320,6 @@ public class IceBlast {
return player;
}
public void setPlayer(Player player) {
this.player = player;
}
public double getDefaultrange() {
return defaultrange;
}
public void setDefaultrange(double defaultrange) {
this.defaultrange = defaultrange;
}
public double getDefaultdamage() {
return defaultdamage;
}
@ -341,4 +328,12 @@ public class IceBlast {
this.defaultdamage = defaultdamage;
}
public double getRange() {
return range;
}
public void setRange(double range) {
this.range = range;
}
}