Package ch.njol.skript.sections
Class EffSecSpawn
java.lang.Object
ch.njol.skript.lang.TriggerItem
ch.njol.skript.lang.TriggerSection
ch.njol.skript.lang.Section
ch.njol.skript.lang.EffectSection
ch.njol.skript.sections.EffSecSpawn
- All Implemented Interfaces:
Debuggable
,SyntaxElement
@Name("Spawn")
@Description({"Spawn a creature. This can be used as an effect and as a section.","If it is used as a section, the section is run before the entity is added to the world.","You can modify the entity in this section, using for example \'event-entity\' or \'cow\'. ","Do note that other event values, such as \'player\', won\'t work in this section."})
@Examples({"spawn 3 creepers at the targeted block","spawn a ghast 5 meters above the player","spawn a zombie at the player:","\tset name of the zombie to \"\""})
@Since("1.0, 2.6.1 (with section)")
public class EffSecSpawn
extends EffectSection
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.njol.skript.lang.Section
Section.SectionContext
-
Field Summary
Fields inherited from class ch.njol.skript.lang.TriggerSection
first, last
Fields inherited from class ch.njol.skript.lang.TriggerItem
parent
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
init(Expression<?>[] exprs, int matchedPattern, Kleenean isDelayed, SkriptParser.ParseResult parseResult, @Nullable SectionNode sectionNode, @Nullable List<TriggerItem> triggerItems)
toString(@Nullable org.bukkit.event.Event e, boolean debug)
protected @Nullable TriggerItem
walk(org.bukkit.event.Event e)
Executes this item and returns the next item to run.Methods inherited from class ch.njol.skript.lang.EffectSection
hasSection, init, parse
Methods inherited from class ch.njol.skript.lang.Section
loadCode, loadCode, loadOptionalCode
Methods inherited from class ch.njol.skript.lang.TriggerSection
run, setNext, setParent, setTriggerItems, walk
Methods inherited from class ch.njol.skript.lang.TriggerItem
debug, getIndentation, getNext, getParent, getTrigger, toString, walk
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.njol.skript.lang.SyntaxElement
getParser
-
Field Details
-
lastSpawned
public static @Nullable org.bukkit.entity.Entity lastSpawned
-
-
Constructor Details
-
EffSecSpawn
public EffSecSpawn()
-
-
Method Details
-
init
public boolean init(Expression<?>[] exprs, int matchedPattern, Kleenean isDelayed, SkriptParser.ParseResult parseResult, @Nullable SectionNode sectionNode, @Nullable List<TriggerItem> triggerItems)- Specified by:
init
in classEffectSection
-
walk
Description copied from class:TriggerItem
Executes 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:
walk
in classTriggerSection
- Returns:
- The next item to run or null to stop execution
-
toString
- Parameters:
e
- The event to get information to. 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
-