Package com.vk2gpz.autosell.multiplier
Class AreaMultiplierFile
java.lang.Object
com.vk2gpz.autosell.multiplier.AreaMultiplierFile
This file is used to load and save the area multipliers from the config file
-
Constructor Summary
ConstructorsConstructorDescriptionAreaMultiplierFile
(org.bukkit.plugin.Plugin instance) The constructor for the AreaMultiplierFile -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsEntry
(String path) Checks if the config file contains a specific entryvoid
Creates an example multiplier in the config fileorg.bukkit.configuration.file.FileConfiguration
load()
Gets the file configuration for the multipliersint
Loads the multipliers from the config filevoid
reload()
Reloads the multipliers from the config filevoid
save()
Saves the multipliers to the file.void
Sets the header for the multipliers config fileboolean
validateMultiplier
(String identifier) Validates the multiplier entry in the config file
-
Constructor Details
-
AreaMultiplierFile
public AreaMultiplierFile(org.bukkit.plugin.Plugin instance) The constructor for the AreaMultiplierFile- Parameters:
instance
- The plugin instance
-
-
Method Details
-
reload
public void reload()Reloads the multipliers from the config file -
load
public org.bukkit.configuration.file.FileConfiguration load()Gets the file configuration for the multipliers- Returns:
- The file configuration for the multipliers
-
save
public void save()Saves the multipliers to the file. -
setHeader
public void setHeader()Sets the header for the multipliers config file -
createExampleMultiplier
public void createExampleMultiplier()Creates an example multiplier in the config file -
containsEntry
Checks if the config file contains a specific entry- Parameters:
path
- The path to check- Returns:
- true if the entry exists, false otherwise
-
validateMultiplier
Validates the multiplier entry in the config file- Parameters:
identifier
- The identifier for the multiplier- Returns:
- true if the multiplier is valid, false otherwise
-
loadMultipliers
public int loadMultipliers()Loads the multipliers from the config file- Returns:
- The number of multipliers loaded
-