public abstract class AnnoyingFile
extends org.bukkit.configuration.file.YamlConfiguration
| Modifier and Type | Field and Description |
|---|---|
boolean |
canBeEmpty
Whether the file can be empty.
|
@NotNull java.io.File |
file
The file constructed using the
path |
@NotNull java.lang.String |
path
The path to the file
|
| Modifier | Constructor and Description |
|---|---|
protected |
AnnoyingFile(@NotNull java.lang.String path,
@NotNull java.io.File file,
boolean canBeEmpty)
Constructs a new
AnnoyingFile |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
create()
Creates the
file |
void |
delete()
Deletes the
file |
void |
load()
Loads the YAML from the path
|
void |
save()
Saves the YAML to the
file |
void |
set(@NotNull java.lang.String path,
@Nullable java.lang.Object value,
boolean save)
Sets a value in the YAML
|
buildHeader, convertMapsToSections, loadConfiguration, loadConfiguration, loadConfiguration, loadFromString, options, parseHeader, saveToStringload, load, load, load, save, saveaddDefault, addDefaults, addDefaults, getDefaults, getParent, setDefaultscontains, contains, createPath, createPath, createSection, createSection, get, get, getBoolean, getBoolean, getBooleanList, getByteList, getCharacterList, getColor, getColor, getConfigurationSection, getCurrentPath, getDefault, getDefaultSection, getDouble, getDouble, getDoubleList, getFloatList, getInt, getInt, getIntegerList, getItemStack, getItemStack, getKeys, getList, getList, getLong, getLong, getLongList, getMapList, getName, getOfflinePlayer, getOfflinePlayer, getRoot, getShortList, getString, getString, getStringList, getValues, getVector, getVector, isBoolean, isColor, isConfigurationSection, isDouble, isInt, isItemStack, isList, isLong, isOfflinePlayer, isPrimitiveWrapper, isSet, isString, isVector, mapChildrenKeys, mapChildrenValues, set, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcontains, contains, createSection, createSection, get, get, getBoolean, getBoolean, getBooleanList, getByteList, getCharacterList, getColor, getColor, getConfigurationSection, getCurrentPath, getDefaultSection, getDouble, getDouble, getDoubleList, getFloatList, getInt, getInt, getIntegerList, getItemStack, getItemStack, getKeys, getList, getList, getLong, getLong, getLongList, getMapList, getName, getOfflinePlayer, getOfflinePlayer, getRoot, getShortList, getString, getString, getStringList, getValues, getVector, getVector, isBoolean, isColor, isConfigurationSection, isDouble, isInt, isItemStack, isList, isLong, isOfflinePlayer, isSet, isString, isVector, set@NotNull public final @NotNull java.lang.String path
@NotNull public final @NotNull java.io.File file
pathpublic final boolean canBeEmpty
save() is usedprotected AnnoyingFile(@NotNull
@NotNull java.lang.String path,
@NotNull
@NotNull java.io.File file,
boolean canBeEmpty)
AnnoyingFilepath - the path to the filefile - the file constructed using the pathcanBeEmpty - whether the file can be empty. If false, the file will be deleted if it's empty when save() is usedpublic abstract void create()
filepublic void load()
public void delete()
filepublic void set(@NotNull
@NotNull java.lang.String path,
@Nullable
@Nullable java.lang.Object value,
boolean save)
path - the path to the valuevalue - the value to setsave - whether to save the file after setting the valuepublic void save()
file