Skip to content

New empty line at beginning of config file #1

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.
        }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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