Package me.hsgamer.hscore.bukkit.config
Class BukkitConfig
java.lang.Object
me.hsgamer.hscore.bukkit.config.BukkitConfig
- All Implemented Interfaces:
Config
The bukkit configuration
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionBukkitConfig(File file) Create a new configBukkitConfig(org.bukkit.plugin.Plugin plugin) Create a new config, the file name will be "config.yml"BukkitConfig(org.bukkit.plugin.Plugin plugin, String filename) Create a new config -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if the configuration contains the pathGet the value from the pathgetComment(CommentType type, String... path) Get the comment.getName()Get the name of the configurationorg.bukkit.configuration.file.YamlConfigurationGet the original instanceGet all values from the pathbooleanisNormalizable(Object object) Check if the object is normalizableNormalize the library-specific objectvoidreload()Reload the configurationvoidsave()Save the configurationvoidSet the value to the pathvoidsetComment(CommentType type, List<String> value, String... path) Set the comment This is a default empty method.voidsetup()Set up the configurationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.hsgamer.hscore.config.Config
clear, get, getComment, getInstance, getInstance, getKeys, getNormalized, getNormalized, getNormalizedValues, isInstance, normalizeObject, remove, setComment, setIfAbsent, setIfAbsent
-
Constructor Details
-
BukkitConfig
Create a new config- Parameters:
file- the file
-
BukkitConfig
Create a new config- Parameters:
plugin- the pluginfilename- the file name
-
BukkitConfig
public BukkitConfig(org.bukkit.plugin.Plugin plugin) Create a new config, the file name will be "config.yml"- Parameters:
plugin- the plugin
-
-
Method Details
-
getOriginal
public org.bukkit.configuration.file.YamlConfiguration getOriginal()Description copied from interface:ConfigGet the original instance- Specified by:
getOriginalin interfaceConfig- Returns:
- the original instance
-
get
Description copied from interface:ConfigGet the value from the path -
set
Description copied from interface:ConfigSet the value to the path -
contains
Description copied from interface:ConfigCheck if the configuration contains the path -
getName
Description copied from interface:ConfigGet the name of the configuration -
getValues
Description copied from interface:ConfigGet all values from the path -
normalize
Description copied from interface:ConfigNormalize the library-specific object -
isNormalizable
Description copied from interface:ConfigCheck if the object is normalizable- Specified by:
isNormalizablein interfaceConfig- Parameters:
object- the object- Returns:
- true if it is
-
setup
public void setup()Description copied from interface:ConfigSet up the configuration -
save
public void save()Description copied from interface:ConfigSave the configuration -
reload
public void reload()Description copied from interface:ConfigReload the configuration -
getComment
Description copied from interface:ConfigGet the comment. This is a default empty method. The implementation can override this method to support comments.- Specified by:
getCommentin interfaceConfig- Parameters:
type- the comment typepath- the path- Returns:
- the comment
-
setComment
Description copied from interface:ConfigSet the comment This is a default empty method. The implementation can override this method to support comments.- Specified by:
setCommentin interfaceConfig- Parameters:
type- the comment typevalue- the comment, can be null to remove the commentpath- the path
-