Record Class ScriptLoadFailedEvent
java.lang.Object
java.lang.Record
com.botwithus.bot.api.event.ScriptLoadFailedEvent
- Record Components:
jar- the JAR path that failed to loadcause- the throwable that surfaced the failuretimestamp- event creation time in milliseconds since epoch
- All Implemented Interfaces:
GameEvent
public record ScriptLoadFailedEvent(Path jar, Throwable cause, long timestamp)
extends Record
implements GameEvent
Fired when the script loader fails to load a JAR (module-info parse error,
missing
provides clause for BotScript, ServiceLoader
instantiation failure, classpath / module-path mismatch, etc.).
The loader publishes one event per failed JAR — successful JARs do not emit. Consumers (notification overlay, ScriptsPanel failure cards) bind to this event to surface the failure to the user.
-
Constructor Summary
ConstructorsConstructorDescriptionScriptLoadFailedEvent(Path jar, Throwable cause) ScriptLoadFailedEvent(Path jar, Throwable cause, long timestamp) Creates an instance of aScriptLoadFailedEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncause()Returns the value of thecauserecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.jar()Returns the value of thejarrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScriptLoadFailedEvent
-
ScriptLoadFailedEvent
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
jar
-
cause
-
timestamp
-