Class AreaMultiplierFile

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

public class AreaMultiplierFile extends Object
This file is used to load and save the area multipliers from the config file
  • Constructor Summary

    Constructors
    Constructor
    Description
    AreaMultiplierFile(org.bukkit.plugin.Plugin instance)
    The constructor for the AreaMultiplierFile
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks if the config file contains a specific entry
    void
    Creates an example multiplier in the config file
    org.bukkit.configuration.file.FileConfiguration
    Gets the file configuration for the multipliers
    int
    Loads the multipliers from the config file
    void
    Reloads the multipliers from the config file
    void
    Saves the multipliers to the file.
    void
    Sets the header for the multipliers config file
    boolean
    Validates the multiplier entry in the config file

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public boolean containsEntry(String path)
      Checks if the config file contains a specific entry
      Parameters:
      path - The path to check
      Returns:
      true if the entry exists, false otherwise
    • validateMultiplier

      public boolean validateMultiplier(String identifier)
      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