mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 20:52:12 -07:00
System prop for default config comment parsing
Allows for certain legacy plugins to continue to work without changing by setting `Paper.parseYamlCommentsByDefault` to false
This commit is contained in:
@@ -15,7 +15,10 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
public class FileConfigurationOptions extends MemoryConfigurationOptions {
|
public class FileConfigurationOptions extends MemoryConfigurationOptions {
|
||||||
private List<String> header = Collections.emptyList();
|
private List<String> header = Collections.emptyList();
|
||||||
private List<String> footer = Collections.emptyList();
|
private List<String> footer = Collections.emptyList();
|
||||||
private boolean parseComments = true;
|
// Paper start - add system prop for comment parsing
|
||||||
|
private static final boolean PAPER_PARSE_COMMENTS_BY_DEFAULT = Boolean.parseBoolean(System.getProperty("Paper.parseYamlCommentsByDefault", "true"));
|
||||||
|
private boolean parseComments = PAPER_PARSE_COMMENTS_BY_DEFAULT;
|
||||||
|
// Paper end
|
||||||
|
|
||||||
protected FileConfigurationOptions(@NotNull MemoryConfiguration configuration) {
|
protected FileConfigurationOptions(@NotNull MemoryConfiguration configuration) {
|
||||||
super(configuration);
|
super(configuration);
|
||||||
|
Reference in New Issue
Block a user