Class PropertiesDatabase

java.lang.Object
org.sgrewritten.stargate.database.property.PropertiesDatabase
All Implemented Interfaces:
StoredPropertiesAPI

public class PropertiesDatabase extends Object implements StoredPropertiesAPI
  • Constructor Details

    • PropertiesDatabase

      public PropertiesDatabase(@NotNull @NotNull File fileLocation) throws IOException
      Parameters:
      fileLocation -

      The properties file to read

      Throws:
      IOException -

      If unable to read the file

  • Method Details

    • getProperty

      public String getProperty(@NotNull @NotNull StoredProperty property)
      Description copied from interface: StoredPropertiesAPI
      Get a property from a stored properties file
      Specified by:
      getProperty in interface StoredPropertiesAPI
      Parameters:
      property -

      The property to get the value of

      Returns:

      The value of the property, or otherwise null

    • setProperty

      public void setProperty(@NotNull @NotNull StoredProperty property, String value)
      Description copied from interface: StoredPropertiesAPI
      Set a property from a stored properties file
      Specified by:
      setProperty in interface StoredPropertiesAPI
      Parameters:
      property -

      The property to set the value on

      value -

      The value to set the property to

    • setProperty

      public void setProperty(StoredProperty property, Object value)
      Description copied from interface: StoredPropertiesAPI
      Set a property from a stored properties file
      Specified by:
      setProperty in interface StoredPropertiesAPI
      Parameters:
      property -

      The property to set the value on

      value -

      The value to set the property to