Class MultiplierFile

java.lang.Object
com.vk2gpz.autosell.multiplier.MultiplierFile

public class MultiplierFile extends Object
This file is used to load and save the multipliers from the config 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

      public void saveMultiplier(Multiplier multi)
      Saves the global multiplier to the config file
    • saveMultiplier

      public void saveMultiplier(List<Multiplier> m)
      Saves the multipliers to the config file
      Parameters:
      m - The list of multipliers to save
    • deleteMultiplier

      public void deleteMultiplier(String uuid, String name)
      Deletes the multiplier for the player
      Parameters:
      uuid - The uuid of the player
      name - The name of the player
    • loadMultiplierIfExists

      public void loadMultiplierIfExists(String uuid)
      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