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 ClassesNested classes/interfaces inherited from class ch.njol.skript.lang.Section
Section.SectionContext -
Field Summary
FieldsFields inherited from class ch.njol.skript.lang.TriggerSection
first, lastFields inherited from class ch.njol.skript.lang.TriggerItem
parent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninit(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 TriggerItemwalk(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, parseMethods inherited from class ch.njol.skript.lang.Section
loadCode, loadCode, loadOptionalCodeMethods inherited from class ch.njol.skript.lang.TriggerSection
run, setNext, setParent, setTriggerItems, walkMethods inherited from class ch.njol.skript.lang.TriggerItem
debug, getIndentation, getNext, getParent, getTrigger, toString, walkMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
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- 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
-