Package com.vk2gpz.autosell.multiplier
Class PermissionMultiplierFile
java.lang.Object
com.vk2gpz.autosell.multiplier.PermissionMultiplierFile
This file is used to load and save the permission multipliers from the config file
-
Constructor Summary
ConstructorsConstructorDescriptionPermissionMultiplierFile(org.bukkit.plugin.Plugin instance) The constructor for the PermissionMultiplierFile -
Method Summary
Modifier and TypeMethodDescriptionvoidCreates an example multiplier if none existorg.bukkit.configuration.file.FileConfigurationload()Loads 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 filebooleanvalidateMultiplier(String identifier) Validates the multiplier entry in the config file
-
Constructor Details
-
PermissionMultiplierFile
public PermissionMultiplierFile(org.bukkit.plugin.Plugin instance) The constructor for the PermissionMultiplierFile- 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()Loads 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 file -
createExampleMultiplier
public void createExampleMultiplier()Creates an example multiplier if none exist -
validateMultiplier
Validates the multiplier entry in the config file- Parameters:
identifier- The identifier of 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
-