Package com.vk2gpz.autosell.multiplier
Class MultiplierFile
java.lang.Object
com.vk2gpz.autosell.multiplier.MultiplierFile
This file is used to load and save the multipliers from the config file
-
Constructor Summary
ConstructorsConstructorDescriptionMultiplierFile(org.bukkit.plugin.Plugin instance) The constructor for the MultiplierFile -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteMultiplier(String uuid, String name) Deletes the multiplier for the playerorg.bukkit.configuration.file.FileConfigurationload()Gets the file configuration for the multipliersvoidLoads the global multiplier from the config filevoidloadMultiplierIfExists(String uuid) Loads the multiplier for the playervoidreload()Reloads the multipliers from the config filevoidsave()Saves the multipliers to the file.intSaves the loaded multipliers to the file.voidsaveMultiplier(Multiplier multi) Saves the global multiplier to the config filevoidSaves the multipliers to the config filevoidSets the header for the multipliers file
-
Constructor Details
-
MultiplierFile
public MultiplierFile(org.bukkit.plugin.Plugin instance) The constructor for the MultiplierFile- 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 file -
loadGlobalMultiplier
public void loadGlobalMultiplier()Loads the global multiplier from the config file -
saveMultiplier
Saves the global multiplier to the config file -
saveMultiplier
Saves the multipliers to the config file- Parameters:
m- The list of multipliers to save
-
deleteMultiplier
Deletes the multiplier for the player- Parameters:
uuid- The uuid of the playername- The name of the player
-
loadMultiplierIfExists
Loads the multiplier for the player- Parameters:
uuid- The uuid of the player
-
saveLoadedMultipliers
public int saveLoadedMultipliers()Saves the loaded multipliers to the file.- Returns:
- The number of multipliers loaded
-