Skip to content

Commit

Permalink
Remove outdated logic from HomingArrowSpell
Browse files Browse the repository at this point in the history
  • Loading branch information
TheComputerGeek2 committed Jan 12, 2018
1 parent 404341b commit 346ece9
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/com/nisovin/magicspells/spells/targeted/HomingArrowSpell.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ public class HomingArrowSpell extends TargetedSpell implements TargetedEntitySpe

float velocity;
int specialEffectInterval = 0;
Class<? extends Projectile> projectileType = Snowball.class;
String projectileClassName = "org.bukkit.entity.Snowball";

List<HomingArrow> arrows = new ArrayList<>();
int monitor = 0;
Expand All @@ -38,20 +36,6 @@ public HomingArrowSpell(MagicConfig config, String spellName) {

velocity = getConfigFloat("velocity", 1F);
specialEffectInterval = getConfigInt("special-effect-interval", 0);
projectileClassName = getConfigString("projectile-class", "org.bukkit.entity.Snowball");
try {
Class<? extends Projectile> configProjectileClass = Class.forName(projectileClassName).asSubclass(Projectile.class);
if (!configProjectileClass.equals(Projectile.class)) {
MagicSpells.error("projectile-class must be a subclass of Projectile");
} else {
projectileType = configProjectileClass;
}
} catch (ClassNotFoundException e) {
MagicSpells.error("Couldn't find class \"" + projectileClassName + '\"');
} catch (ClassCastException e) {
MagicSpells.error("Couldn't cast \"" + projectileClassName + "\" as Projectile");
}

projectileManager = ProjectileManagers.getManager(getConfigString("projectile-type", "arrow"));
}

Expand Down

0 comments on commit 346ece9

Please sign in to comment.