Record Class Addon

java.lang.Object
java.lang.Record
de.presti.ree6.addons.Addon
Record Components:
addonInterface - AddonInterface.
name - Add-on Name.
author - Add-on Author.
version - Add-on Version.
apiVersion - Ree6 Version used for the Addon.
classPath - Path to the Main-Class in the JAR.
file - The actual JAR as File.

public record Addon(AddonInterface addonInterface, String name, String author, String version, String apiVersion, String classPath, File file) extends Record
Created a new Local-Addon
  • Constructor Details

    • Addon

      public Addon(AddonInterface addonInterface, String name, String author, String version, String apiVersion, String classPath, File file)
      Creates an instance of a Addon record class.
      Parameters:
      addonInterface - the value for the addonInterface record component
      name - the value for the name record component
      author - the value for the author record component
      version - the value for the version record component
      apiVersion - the value for the apiVersion record component
      classPath - the value for the classPath record component
      file - the value for the file record component
  • Method Details

    • getAddonInterface

      public AddonInterface getAddonInterface()
      Get the AddonInterface.
      Returns:
      AddonInterface.
    • getName

      public String getName()
      Get the Add-on Name.
      Returns:
      Add-on Name.
    • getAuthor

      public String getAuthor()
      Get the Author Name.
      Returns:
      Author Name.
    • getVersion

      public String getVersion()
      Get the Add-on Version.
      Returns:
      Add-on Version.
    • getApiVersion

      public String getApiVersion()
      Get the Ree6 Version used for the Addon.
      Returns:
      used Ree6 Version.
    • getClassPath

      public String getClassPath()
      Get the Path to the Main class.
      Returns:
      Main class Path.
    • getFile

      public File getFile()
      Get the actual File.
      Returns:
      File.
    • toString

      public String toString()
      Get everything in a single String.
      Specified by:
      toString in class Record
      Returns:
      a String with every data.
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • addonInterface

      public AddonInterface addonInterface()
      Returns the value of the addonInterface record component.
      Returns:
      the value of the addonInterface record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • author

      public String author()
      Returns the value of the author record component.
      Returns:
      the value of the author record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • apiVersion

      public String apiVersion()
      Returns the value of the apiVersion record component.
      Returns:
      the value of the apiVersion record component
    • classPath

      public String classPath()
      Returns the value of the classPath record component.
      Returns:
      the value of the classPath record component
    • file

      public File file()
      Returns the value of the file record component.
      Returns:
      the value of the file record component