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 TypeMethodDescriptionvoid
deleteMultiplier
(String uuid, String name) Deletes the multiplier for the playerorg.bukkit.configuration.file.FileConfiguration
load()
Gets the file configuration for the multipliersvoid
Loads the global multiplier from the config filevoid
loadMultiplierIfExists
(String uuid) Loads the multiplier for the playervoid
reload()
Reloads the multipliers from the config filevoid
save()
Saves the multipliers to the file.int
Saves the loaded multipliers to the file.void
saveMultiplier
(Multiplier multi) Saves the global multiplier to the config filevoid
Saves the multipliers to the config filevoid
Sets 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
-