001/* 002 * PlotSquared, a land and world management plugin for Minecraft. 003 * Copyright (C) IntellectualSites <https://intellectualsites.com> 004 * Copyright (C) IntellectualSites team and contributors 005 * 006 * This program is free software: you can redistribute it and/or modify 007 * it under the terms of the GNU General Public License as published by 008 * the Free Software Foundation, either version 3 of the License, or 009 * (at your option) any later version. 010 * 011 * This program is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 014 * GNU General Public License for more details. 015 * 016 * You should have received a copy of the GNU General Public License 017 * along with this program. If not, see <https://www.gnu.org/licenses/>. 018 */ 019package com.plotsquared.core.configuration.file; 020 021/** 022 * Various settings for controlling the input and output of a {@link 023 * YamlConfiguration}. 024 */ 025public class YamlConfigurationOptions extends FileConfigurationOptions { 026 027 YamlConfigurationOptions(YamlConfiguration configuration) { 028 super(configuration); 029 } 030 031 @Override 032 public YamlConfiguration configuration() { 033 return (YamlConfiguration) super.configuration(); 034 } 035 036 @Override 037 public YamlConfigurationOptions copyDefaults(boolean value) { 038 super.copyDefaults(value); 039 return this; 040 } 041 042 @Override 043 public YamlConfigurationOptions header(String value) { 044 super.header(value); 045 return this; 046 } 047 048 @Override 049 public YamlConfigurationOptions copyHeader(boolean value) { 050 super.copyHeader(value); 051 return this; 052 } 053 054 /** 055 * Gets how much spaces should be used to indent each line. 056 * 057 * <p>The minimum value this may be is 2, and the maximum is 9. 058 * 059 * @return How much to indent by 060 */ 061 int indent() { 062 return 2; 063 } 064 065}