Skip to content

New empty line at beginning of config file #1

@mickare

Description

@mickare

Every time I start my proxy with the BungeeBan Plugin that uses this "Library" an empy new line is inserted at the beginning of the config file.

# BungeeBan Main Config


storagetype: mysql
....

The new empty line is inserted after the first comment "# BungeeBan Main Config".

Config.java:75 - When the loop went through it adds an additional new line char.
But if there is already a new line char, then ... aah you understand what i mean...

for(String line : CONFIG_HEADER.split("\n")) {
       newConfig.write("# "+line+"\n");
}

Because you already add a new line if there is already one in YAMLConfiguration:42-45

        StringBuilder builder = new StringBuilder(buildHeader());
        if (builder.length() > 0) {
            builder.append('\n'); // newline after header, if present.
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions