I've loved this mod for many years and have made a few commands but I'm trying to add one now and it is not working.
I'm trying to create a command that adds a DamageDealtModifier listener to a ship. Currently it mods the ship in other ways and it's working fine but when I add the code for the DamageDealtModifier listener something is wrong and it doesn't appear in the list of registered commands.
I'm adding this listener
public static class HighScatterAmpDamageDealtMod implements DamageDealtModifier {
protected ShipAPI ship;
public HighScatterAmpDamageDealtMod(ShipAPI ship) {
this.ship = ship;
}
public String modifyDamageDealt(Object param,
CombatEntityAPI target, DamageAPI damage,
Vector2f point, boolean shieldHit) {
if (!(param instanceof DamagingProjectileAPI) && param instanceof BeamAPI) {
damage.setForceHardFlux(true);
}
return null;
}
}
and I'm calling it in the runCommand method with
ship.addListener(new HighScatterAmpDamageDealtMod(ship));
Any idea why it isn't working?