@Override public void initialize() { super.initialize(); if (spellOnHitEntity != null && !spellOnHitEntity.process()) { spellOnHitEntity = null; MagicSpells.error("Invalid spell-on-hit-entity for " + internalName); } if (spellOnHitGround != null && !spellOnHitGround.process()) { spellOnHitGround = null; MagicSpells.error("Invalid spell-on-hit-ground for " + internalName); } }
@Override public void initialize() { super.initialize(); spells = new ArrayList<Subspell>(); if (spellNames != null) { for (String spellName : spellNames) { Subspell spell = new Subspell(spellName); if (spell.process()) { spells.add(spell); } else { MagicSpells.error( "Projectile spell '" + internalName + "' attempted to add invalid spell '" + spellName + "'."); } } } if (spells.size() == 0) { MagicSpells.error("Projectile spell '" + internalName + "' has no spells!"); } if (projectileClass != null) { if (projectileClass == EnderPearl.class) { registerEvents(new EnderTpListener()); } else if (projectileClass == Egg.class) { registerEvents(new EggListener()); } else if (projectileClass == ThrownPotion.class) { registerEvents(new PotionListener()); } registerEvents(new ProjectileListener()); } else if (projectileItem != null) { registerEvents(new PickupListener()); } }