Package org.bukkit.entity
Interface TNTPrimed
- All Superinterfaces:
CommandSender
,Entity
,Explosive
,Metadatable
,Nameable
,Permissible
,PersistentDataHolder
,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.void
setSource(Entity source)
Sets the source of this primed TNT.Methods inherited from interface org.bukkit.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage
Methods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, eject, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isOnGround, isPersistent, isSilent, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, 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
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
-
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
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. The source entity may be invalid if for example it has since died or been unloaded. Callers should check
Entity.isValid()
.- Returns:
- the source of this primed TNT
-
setSource
Sets the source of this primed TNT. The source is the entity responsible for the creation of this primed TNT.Must be instance of
LivingEntity
otherwise will be set to null. The parameter is typedEntity
to be consistent withgetSource()
method.- Parameters:
source
- the source of this primed TNT
-