Creating enchantment objects based on configuration I'm searching a way to literally shorten my code.
For the moment my code is this;

    if(getDashConfig().getBoolean("enchantments.multifirearrow.enabled")){
        MultiFireArrow fire = new MultiFireArrow();
        DashEnchant.getEnchants().put(1, fire);
        DashEnchant.getStringEnchants().put("multifirearrow", fire);
        if(debug()){
            getLogger().info("MultiFireArrow enchant registred");
        }
    if(getDashConfig().getBoolean("enchantments.bolt.enabled")){    
        Bolt bolt = new Bolt();
        DashEnchant.getEnchants().put(2, bolt);
        DashEnchant.getStringEnchants().put("bolt", bolt);
        if(debug()){ getLogger().info("Bolt enchant registred"); }
        }
    if(getDashConfig().getBoolean("enchantments.randomspeed.enabled")){
        SpeedRandom speed = new SpeedRandom();
        DashEnchant.getEnchants().put(3, speed);
        DashEnchant.getStringEnchants().put("randomspeed", speed);
        if(debug()){ getLogger().info("RandomSpeed enchant registred"); }


Not that presentable.. uh?
How i would literally shorten it? I don't want 350 lines like that.
Assuming you already have a class called Enchant (should be a superclass of your enchantments), you could use an enum to organize all of your enchantments:

public enum Enchantments {
    MULTI_FIRE(1, "multifirearrow") {
        Enchant getEnchant() { return new MultiFireArrow(); }
    }, BOLT(2, "bolt") {
        Enchant getEnchant() { return new Bolt(); }
    }, RANDOM_SPEED(3, "randomspeed") {
        Enchant getEnchant() { return new SpeedRandom(); }
    };
    //Add more enchantments here!
    abstract Enchant getEnchant();
    public void enchant() {
        Enchant enchant = getEnchant();
        DashEnchant.getEnchants().put(this.index, enchant);
        DashEnchant.getStringEnchants().put(this.name, enchant);
        if(debug()) getLogger().info(this.toString() + " enchant registered");
    }
    public boolean isEnabled() {
        return getDashConfig().getBoolean("enchantments." + this.name + ".enabled");        
    }
    private String name;  
    private int index;    
    private Enchantment(int index, String name) {
        this.index = index;
        this.name = name;
    }
}


and then do something like:

for(Enchantment e : Enchantment.values())
    if(e.isEnabled()) e.enchant();


You could make the code even shorter using reflection and enum ordinals but there is a point where shortening the code doesn't really help anymore (plus the added speed penalty.) Nonetheless: (replace MY_PACKAGE_NAME with your package)

public enum Enchantment {
    MULTI_FIRE, BOLT, SPEED_RANDOM;
    //Add more enchantments here!
    public void enchant() {
        Enchant enchant = Class.forName(MY_PACKAGE_NAME +
                toUpperCamel(this.toString(), "_")).newInstance();
        DashEnchant.getEnchants().put(this.ordinal() + 1, enchant); //ordinal starts at 0
        DashEnchant.getStringEnchants().put(this.replaceAll("_", "").toLowerCase(), enchant);
        if(debug()) getLogger().info(this.toString() + " enchant registered");
    }
    public boolean isEnabled() {
        return getDashConfig().getBoolean("enchantments." +
                this.toString().replaceAll("_", "").toLowerCase() + ".enabled");        
    }
    private static String toUpperCamel(String a, String spl) {
        StringBuilder b = new StringBuilder(a.length());
        for(String s : a.split(spl)) {
            b.append(Character.toUpperCase(s.charAt(0)));
            b.append(s.substring(1).toLowerCase());
        } return b.toString();
    }
}