Package com.soulfiremc.server.script
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 Summary
ConstructorsConstructorDescriptionScript
(UUID scriptId, String name, Path dataPath, Path codePath, ScriptEntity.ScriptType scriptType, boolean elevatedPermissions, ScriptLanguage language, AtomicReference<ScriptManager.RuntimeComponents> runtime) Creates an instance of aScript
record class. -
Method Summary
Modifier and TypeMethodDescriptioncodePath()
Returns the value of thecodePath
record component.dataPath()
Returns the value of thedataPath
record component.boolean
Returns the value of theelevatedPermissions
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.language()
Returns the value of thelanguage
record component.name()
Returns the value of thename
record component.runtime()
Returns the value of theruntime
record component.scriptId()
Returns the value of thescriptId
record component.Returns the value of thescriptType
record component.final String
toString()
Returns a string representation of this record class.
-
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 aScript
record class.- Parameters:
scriptId
- the value for thescriptId
record componentname
- the value for thename
record componentdataPath
- the value for thedataPath
record componentcodePath
- the value for thecodePath
record componentscriptType
- the value for thescriptType
record componentelevatedPermissions
- the value for theelevatedPermissions
record componentlanguage
- the value for thelanguage
record componentruntime
- the value for theruntime
record component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
scriptId
Returns the value of thescriptId
record component.- Returns:
- the value of the
scriptId
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
dataPath
Returns the value of thedataPath
record component.- Returns:
- the value of the
dataPath
record component
-
codePath
Returns the value of thecodePath
record component.- Returns:
- the value of the
codePath
record component
-
scriptType
Returns the value of thescriptType
record component.- Returns:
- the value of the
scriptType
record component
-
elevatedPermissions
public boolean elevatedPermissions()Returns the value of theelevatedPermissions
record component.- Returns:
- the value of the
elevatedPermissions
record component
-
language
Returns the value of thelanguage
record component.- Returns:
- the value of the
language
record component
-
runtime
Returns the value of theruntime
record component.- Returns:
- the value of the
runtime
record component
-