Class YmlReader
java.lang.Object
com.github.cyberryan1.cybercore.spigot.config.YmlReader
- Direct Known Subclasses:
YmlEditor
Allows one to read the data from a YML file.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFirst checks if the path is valid, then returns the object found at the pathboolean
First checks if the path is valid, then returns the boolean found at the pathgetColoredStr
(String path) First checks if the path is valid, then returns the colored string found at the pathString[]
getColoredStrList
(String path) First checks if the path is valid, then returns the list of colored strings found at the pathorg.bukkit.configuration.file.FileConfiguration
double
First checks if the path is valid, then returns the double found at the pathfloat
First checks if the path is valid, then returns the float found at the pathint
First checks if the path is valid, then returns the int found at the pathThe list of all paths in the config that start with the provided path (deep search).long
First checks if the path is valid, then returns the long found at the pathFirst checks if the path is valid, then returns the string found at the pathString[]
getStrList
(String path) First checks if the path is valid, then returns the list of strings found at the pathboolean
void
sendPathNotFoundWarns
(boolean sendPathNotFoundErrors)
-
Constructor Details
-
Method Details
-
getYmlLoader
- Returns:
- The
YmlLoader
instance
-
getConfig
public org.bukkit.configuration.file.FileConfiguration getConfig()- Returns:
- The
FileConfiguration
provided by theYmlLoader
-
sendPathNotFoundWarns
public void sendPathNotFoundWarns(boolean sendPathNotFoundErrors) - Parameters:
sendPathNotFoundErrors
- Whether or not to send warnings when a path is not found
-
isSendingPathNotFoundWarns
public boolean isSendingPathNotFoundWarns()- Returns:
- Whether or not warnings are sent when a path is not found
-
getBool
First checks if the path is valid, then returns the boolean found at the path- Parameters:
path
- The path to get the value of- Returns:
- The boolean found at the path
-
getInt
First checks if the path is valid, then returns the int found at the path- Parameters:
path
- The path to get the value of- Returns:
- The int found at the path
-
getLong
First checks if the path is valid, then returns the long found at the path- Parameters:
path
- The path to get the value of- Returns:
- The long found at the path
-
getFloat
First checks if the path is valid, then returns the float found at the path- Parameters:
path
- The path to get the value of- Returns:
- The float found at the path
-
getDouble
First checks if the path is valid, then returns the double found at the path- Parameters:
path
- The path to get the value of- Returns:
- The double found at the path
-
getStr
First checks if the path is valid, then returns the string found at the path- Parameters:
path
- The path to get the value of- Returns:
- The string found at the path
-
getColoredStr
First checks if the path is valid, then returns the colored string found at the path- Parameters:
path
- The path to get the value of- Returns:
- The colored string found at the path
-
getStrList
First checks if the path is valid, then returns the list of strings found at the path- Parameters:
path
- The path to get the value of- Returns:
- The list of strings found at the path
-
getColoredStrList
First checks if the path is valid, then returns the list of colored strings found at the path- Parameters:
path
- The path to get the value of- Returns:
- The list of colored strings found at the path
-
get
First checks if the path is valid, then returns the object found at the path- Parameters:
path
- The path to get the value of- Returns:
- The object found at the path
-
getAllKeys
- Returns:
- The list of all paths in the config (deep search)
-
getKeys
The list of all paths in the config that start with the provided path (deep search).- Parameters:
startingPath
- The path to start the search at (should end with a '.')- Returns:
- The list of all paths in the config that start with the provided path
-