Record Class ScriptManager.Script

java.lang.Object
java.lang.Record
com.soulfiremc.server.script.ScriptManager.Script
Enclosing class:
ScriptManager

public static record ScriptManager.Script(UUID scriptId, String name, Path dataPath, Path codePath, ScriptEntity.ScriptType scriptType, boolean elevatedPermissions, ScriptLanguage language, AtomicReference<ScriptManager.RuntimeComponents> runtime) extends Record
  • Constructor Details

    • Script

      public Script(UUID scriptId, String name, Path dataPath, Path codePath, ScriptEntity.ScriptType scriptType, boolean elevatedPermissions, ScriptLanguage language, AtomicReference<ScriptManager.RuntimeComponents> runtime)
      Creates an instance of a Script record class.
      Parameters:
      scriptId - the value for the scriptId record component
      name - the value for the name record component
      dataPath - the value for the dataPath record component
      codePath - the value for the codePath record component
      scriptType - the value for the scriptType record component
      elevatedPermissions - the value for the elevatedPermissions record component
      language - the value for the language record component
      runtime - the value for the runtime record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • scriptId

      public UUID scriptId()
      Returns the value of the scriptId record component.
      Returns:
      the value of the scriptId record component
    • name

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

      public Path dataPath()
      Returns the value of the dataPath record component.
      Returns:
      the value of the dataPath record component
    • codePath

      public Path codePath()
      Returns the value of the codePath record component.
      Returns:
      the value of the codePath record component
    • scriptType

      public ScriptEntity.ScriptType scriptType()
      Returns the value of the scriptType record component.
      Returns:
      the value of the scriptType record component
    • elevatedPermissions

      public boolean elevatedPermissions()
      Returns the value of the elevatedPermissions record component.
      Returns:
      the value of the elevatedPermissions record component
    • language

      public ScriptLanguage language()
      Returns the value of the language record component.
      Returns:
      the value of the language record component
    • runtime

      Returns the value of the runtime record component.
      Returns:
      the value of the runtime record component