Class 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
  • 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 class EffectSection
    • walk

      protected @Nullable TriggerItem walk(org.bukkit.event.Event e)
      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 class TriggerSection
      Returns:
      The next item to run or null to stop execution
    • toString

      public String toString(@Nullable org.bukkit.event.Event e, boolean debug)
      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