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 TypeMethodDescriptionbooleancontainsEntry(String path) Checks if the config file contains a specific entryvoidCreates an example multiplier in the config fileorg.bukkit.configuration.file.FileConfigurationload()Gets the file configuration for the multipliersintLoads the multipliers from the config filevoidreload()Reloads the multipliers from the config filevoidsave()Saves the multipliers to the file.voidSets the header for the multipliers config filebooleanvalidateMultiplier(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
-