Package org.bukkit.entity
Interface TNTPrimed
- All Superinterfaces:
CommandSender
,Entity
,Explosive
,Metadatable
,Permissible
,ServerOperator
public interface TNTPrimed extends Explosive
Represents a Primed TNT.
-
Nested Class Summary
-
Method Summary
Modifier and Type Method Description int
getFuseTicks()
Retrieve the number of ticks until the explosion of this TNTPrimed entityEntity
getSource()
Gets the source of this primed TNT.void
setFuseTicks(int fuseTicks)
Set the number of ticks until the TNT blows up after being primed.Methods inherited from interface org.bukkit.entity.Entity
eject, getCustomName, getEntityId, getFallDistance, getFireTicks, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getPassenger, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWorld, isCustomNameVisible, isDead, isEmpty, isInsideVehicle, isOnGround, isValid, leaveVehicle, playEffect, remove, setCustomName, setCustomNameVisible, setFallDistance, setFireTicks, setLastDamageCause, setPassenger, setTicksLived, setVelocity, spigot, teleport, teleport, teleport, teleport
Methods inherited from interface org.bukkit.entity.Explosive
getYield, isIncendiary, setIsIncendiary, setYield
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
-
Method Details
-
setFuseTicks
void setFuseTicks(int fuseTicks)Set the number of ticks until the TNT blows up after being primed.- Parameters:
fuseTicks
- The fuse ticks
-
getFuseTicks
int getFuseTicks()Retrieve the number of ticks until the explosion of this TNTPrimed entity- Returns:
- the number of ticks until this TNTPrimed explodes
-
getSource
Entity getSource()Gets the source of this primed TNT. The source is the entity responsible for the creation of this primed TNT. (I.E. player ignites TNT with flint and steel.) Take note that this can be null if there is no suitable source. (created by theWorld.spawn(Location, Class)
method, for example.)The source will become null if the chunk this primed TNT is in is unloaded then reloaded. If the source Entity becomes invalidated for any reason, such being removed from the world, the returned value will be null.
- Returns:
- the source of this primed TNT
-