Class EffSecSuppressTypeHints
java.lang.Object
ch.njol.skript.lang.TriggerItem
ch.njol.skript.lang.TriggerSection
ch.njol.skript.lang.Section
ch.njol.skript.lang.EffectSection
org.skriptlang.skript.common.elements.effects.EffSecSuppressTypeHints
- All Implemented Interfaces:
Debuggable, SyntaxElement, ExperimentalSyntax, SimpleExperimentalSyntax, RuntimeErrorProducer, SyntaxRuntimeErrorProducer
@Name("Suppress Type Hints (Experimental)")
@Description("An effect to suppress local variable type hint errors for the syntax lines that follow this effect.\nNOTE: Suppressing type hints also prevents syntax from providing new type hints. For example, with type hints suppressed, 'set {_x} to true' would not provide 'boolean' as a type hint for '{_x}'\n")
@Example("start suppressing local variable type hints\n# potentially unsafe code goes here\nstop suppressing local variable type hints\n")
@Since({"2.12","2.17 (suppressing in a section)"})
public class EffSecSuppressTypeHints
extends EffectSection
implements SimpleExperimentalSyntax
-
Nested Class Summary
Nested classes/interfaces inherited from class Section
Section.SectionContext -
Field Summary
Fields inherited from class TriggerSection
first, lastFields inherited from class TriggerItem
parent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionTheExperimentDataused to check that the currentExperimentSetmeets the requirements.booleaninit(Expression<?>[] expressions, int matchedPattern, Kleenean isDelayed, SkriptParser.ParseResult parseResult, @Nullable SectionNode sectionNode, @Nullable List<TriggerItem> triggerItems) static voidregister(SyntaxRegistry syntaxRegistry) toString(@Nullable org.bukkit.event.Event event, boolean debug) protected @Nullable TriggerItemwalk(org.bukkit.event.Event event) Executes this item and returns the next item to run.Methods inherited from class EffectSection
hasSection, init, parse, parseMethods inherited from class Section
getNode, getSyntaxTypeName, loadCode, loadCode, loadCode, loadCode, loadOptionalCode, preInitMethods inherited from class TriggerSection
run, setNext, setParent, setTriggerItems, triggerExecutionIntent, walkMethods inherited from class TriggerItem
debug, executionIntent, getActualNext, getIndentation, getNext, getParent, getTrigger, toString, walkMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface RuntimeErrorProducer
error, error, getRuntimeErrorManager, warning, warningMethods inherited from interface SimpleExperimentalSyntax
isSatisfiedByMethods inherited from interface SyntaxElement
getParser, getSyntaxTypeName, init, preInitMethods inherited from interface SyntaxRuntimeErrorProducer
getErrorSource
-
Constructor Details
-
EffSecSuppressTypeHints
public EffSecSuppressTypeHints()
-
-
Method Details
-
register
-
init
public boolean init(Expression<?>[] expressions, int matchedPattern, Kleenean isDelayed, SkriptParser.ParseResult parseResult, @Nullable @Nullable SectionNode sectionNode, @Nullable @Nullable List<TriggerItem> triggerItems) - Specified by:
initin classEffectSection
-
walk
Description copied from class:TriggerItemExecutes this item and returns the next item to run.Overriding classes must call
TriggerItem.debug(Event, boolean). If this method is overridden,TriggerItem.run(Event)is not used anymore and can be ignored.- Specified by:
walkin classTriggerSection- Parameters:
event- The event- Returns:
- The next item to run or null to stop execution
-
toString
- Specified by:
toStringin interfaceDebuggable- Parameters:
event- The event to get information from. This is always null if debug == false.debug- If true this should print more information, if false this should print what is shown to the end user- Returns:
- String representation of this object
-
getExperimentData
Description copied from interface:SimpleExperimentalSyntaxTheExperimentDataused to check that the currentExperimentSetmeets the requirements.- Specified by:
getExperimentDatain interfaceSimpleExperimentalSyntax
-