Package org.bukkit.entity.minecart
Interface ExplosiveMinecart
- All Superinterfaces:
CommandSender
,Entity
,Explosive
,Metadatable
,Minecart
,Nameable
,Permissible
,PersistentDataHolder
,ServerOperator
,Vehicle
Represents a Minecart with TNT inside it that can explode when triggered.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.Spigot
-
Method Summary
Modifier and TypeMethodDescriptionvoid
explode()
Immediately explode this minecart with the power assumed by its current movement.void
explode
(double power) Immediately explode this minecart with the given power.float
Gets the factor by which explosion yield increases based on Minecart speed.int
Get the fuse ticks of this minecart.void
ignite()
Ignite this minecart's fuse naturally.boolean
Check whether or not this minecart's fuse has been ignited.void
setExplosionSpeedFactor
(float factor) Sets the factor by which explosion yield increases based on Minecart speed.void
setFuseTicks
(int ticks) Set the fuse ticks of this minecart.Methods inherited from interface org.bukkit.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage
Methods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, copy, copy, createSnapshot, eject, getAsString, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getType, getUniqueId, getVehicle, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isInWorld, isOnGround, isPersistent, isSilent, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVisibleByDefault, setVisualFire, 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.entity.Minecart
getDamage, getDerailedVelocityMod, getDisplayBlock, getDisplayBlockData, getDisplayBlockOffset, getFlyingVelocityMod, getMaxSpeed, isSlowWhenEmpty, setDamage, setDerailedVelocityMod, setDisplayBlock, setDisplayBlockData, setDisplayBlockOffset, setFlyingVelocityMod, setMaxSpeed, setSlowWhenEmpty
Methods inherited from interface org.bukkit.Nameable
getCustomName, setCustomName
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
Methods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
Methods inherited from interface org.bukkit.entity.Vehicle
getVelocity, setVelocity
-
Method Details
-
setFuseTicks
void setFuseTicks(int ticks) Set the fuse ticks of this minecart. If the fuse ticks are set to a non-zero value, this will ignite the explosive.- Parameters:
ticks
- the ticks
-
getFuseTicks
int getFuseTicks()Get the fuse ticks of this minecart. If the fuse ticks reach 0, the minecart will explode.- Returns:
- the fuse ticks, or -1 if this minecart's fuse has not yet been ignited
-
getExplosionSpeedFactor
float getExplosionSpeedFactor()Gets the factor by which explosion yield increases based on Minecart speed.- Returns:
- increase factor
-
setExplosionSpeedFactor
void setExplosionSpeedFactor(float factor) Sets the factor by which explosion yield increases based on Minecart speed.- Parameters:
factor
- new factor
-
ignite
void ignite()Ignite this minecart's fuse naturally. -
isIgnited
boolean isIgnited()Check whether or not this minecart's fuse has been ignited.- Returns:
- true if ignited, false otherwise
-
explode
void explode()Immediately explode this minecart with the power assumed by its current movement. -
explode
void explode(double power) Immediately explode this minecart with the given power.- Parameters:
power
- the power to use. Must be positive and cannot exceed 5.0
-