Class EvtAtTime
java.lang.Object
io.github.syst3ms.skriptparser.lang.event.SkriptEvent
io.github.syst3ms.skriptparser.event.EvtAtTime
- All Implemented Interfaces:
StartOnLoadEvent, SyntaxElement
This event will trigger each day at a given time.
Note that this may have some delay. The event certainly isn't accurate to the millisecond.
- Since:
- ALPHA
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck(TriggerContext ctx) Whether this event should trigger, given theTriggerContextgetTime()booleaninit(Expression<?>[] expressions, int matchedPattern, ParseContext parseContext) Initializes this SyntaxElement before being used.voidonInitialLoad(Trigger trigger) Fired when a script is loaded.toString(TriggerContext ctx, boolean debug) Methods inherited from class SkriptEvent
addTrigger, clearTrigger, getAllowedSyntaxes, getLoadingPriority, getTriggers, isRestrictingExpressions, loadSection
-
Constructor Details
-
EvtAtTime
public EvtAtTime()
-
-
Method Details
-
init
Description copied from interface:SyntaxElementInitializes this SyntaxElement before being used. This method is always called before all the others in an extending class, the only exception beingCodeSection.loadSection(FileSection, ParserState, SkriptLogger).- Specified by:
initin interfaceSyntaxElement- Overrides:
initin classSkriptEvent- Parameters:
expressions- an array of expressions representing all the expressions that are being passed to this syntax element. As opposed to Skript, elements of this array can't benull.matchedPattern- the index of the pattern that was successfully matched. It corresponds to the order of the syntaxes in registrationparseContext- an object containing additional information about the parsing of this syntax element, like regex matches and parse marks- Returns:
trueif the syntax element was initialized successfully,falseotherwise.- See Also:
-
check
Description copied from class:SkriptEventWhether this event should trigger, given theTriggerContext- Specified by:
checkin classSkriptEvent- Parameters:
ctx- the TriggerContext to check- Returns:
- whether the event should trigger
-
toString
- Specified by:
toStringin interfaceSyntaxElement- Parameters:
ctx- the eventdebug- whether to show additional information or not- Returns:
- a
Stringthat should aim to resemble what is written in the script as closely as possible
-
getTime
-
onInitialLoad
Description copied from interface:StartOnLoadEventFired when a script is loaded.- Specified by:
onInitialLoadin interfaceStartOnLoadEvent- Parameters:
trigger- The trigger that is fired when the script is loaded
-