#1031: Expose Creeper igniter

By: Doc <nachito94@msn.com>
This commit is contained in:
Bukkit/Spigot
2024-06-19 06:45:43 +10:00
parent 7df49b52f2
commit 48b3ffa858

View File

@@ -1,5 +1,8 @@
package org.bukkit.entity; package org.bukkit.entity;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/** /**
* Represents a Creeper * Represents a Creeper
*/ */
@@ -69,7 +72,7 @@ public interface Creeper extends Monster {
/** /**
* Makes this Creeper explode instantly. * Makes this Creeper explode instantly.
* * <br>
* The resulting explosion can be cancelled by an * The resulting explosion can be cancelled by an
* {@link org.bukkit.event.entity.ExplosionPrimeEvent} and obeys the mob * {@link org.bukkit.event.entity.ExplosionPrimeEvent} and obeys the mob
* griefing gamerule. * griefing gamerule.
@@ -78,13 +81,35 @@ public interface Creeper extends Monster {
/** /**
* Ignites this Creeper, beginning its fuse. * Ignites this Creeper, beginning its fuse.
* * <br>
* The amount of time the Creeper takes to explode will depend on what * The amount of time the Creeper takes to explode will depend on what
* {@link #setMaxFuseTicks} is set as. * {@link #setMaxFuseTicks} is set as.
* <br>
* The resulting explosion can be cancelled by an
* {@link org.bukkit.event.entity.ExplosionPrimeEvent} and obeys the mob
* griefing gamerule.
* *
* @param entity the entity which ignited the creeper
*/
public void ignite(@NotNull Entity entity);
/**
* Ignites this Creeper, beginning its fuse.
* <br>
* The amount of time the Creeper takes to explode will depend on what
* {@link #setMaxFuseTicks} is set as.
* <br>
* The resulting explosion can be cancelled by an * The resulting explosion can be cancelled by an
* {@link org.bukkit.event.entity.ExplosionPrimeEvent} and obeys the mob * {@link org.bukkit.event.entity.ExplosionPrimeEvent} and obeys the mob
* griefing gamerule. * griefing gamerule.
*/ */
public void ignite(); public void ignite();
/**
* Gets the entity which ignited the creeper, if available.
*
* @return the entity which ignited the creeper (if available) or null
*/
@Nullable
public Entity getIgniter();
} }