Package org.bukkit.entity
Interface Wither
- All Superinterfaces:
Attributable
,Audience
,Boss
,CommandSender
,Creature
,Damageable
,Enemy
,Entity
,Frictional
,HoverEventSource<HoverEvent.ShowEntity>
,LivingEntity
,Lootable
,Metadatable
,Mob
,Monster
,Nameable
,Permissible
,PersistentDataHolder
,Pointered
,ProjectileSource
,RangedEntity
,ServerOperator
,Sound.Emitter
Represents a Wither boss
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Represents one of the Wither's heads.Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.Spigot
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
Makes the wither invulnerable for 11 seconds and sets the health to one third of the max health.int
Deprecated, for removal: This API element is subject to removal in a future version.int
getTarget
(@NotNull Wither.Head head) This method will get the target of individual headsWither.Head
of the wither.boolean
void
setCanTravelThroughPortals
(boolean value) Sets whether the wither can travel through portals.void
setInvulnerabilityTicks
(int ticks) Deprecated, for removal: This API element is subject to removal in a future version.Duplicate api, usesetInvulnerableTicks(int)
void
setInvulnerableTicks
(int ticks) Sets for how long in the future, the wither should be invulnerable.void
setTarget
(@NotNull Wither.Head head, @Nullable LivingEntity target) This method will set the target of individual headsWither.Head
of the wither.void
setTarget
(@Nullable LivingEntity target) Instructs this Mob to set the specified LivingEntity as its target.Methods inherited from interface org.bukkit.attribute.Attributable
getAttribute, registerAttribute
Methods inherited from interface net.kyori.adventure.audience.Audience
clearTitle, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, showTitle, stopSound, stopSound
Methods inherited from interface org.bukkit.entity.Boss
getBossBar
Methods inherited from interface org.bukkit.command.CommandSender
getName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessage
Methods inherited from interface org.bukkit.entity.Damageable
damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, resetMaxHealth, setAbsorptionAmount, setHealth, setMaxHealth
Methods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, asHoverEvent, collidesAt, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isPersistent, isSilent, isSneaking, isTicking, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, wouldCollideUsing
Methods inherited from interface io.papermc.paper.entity.Frictional
getFrictionState, setFrictionState
Methods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEvent
Methods inherited from interface org.bukkit.entity.LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, broadcastSlotBreak, broadcastSlotBreak, canBreatheUnderwater, clearActiveItem, damageItemStack, damageItemStack, getActiveItem, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getBeeStingerCooldown, getBeeStingersInBody, getBodyYaw, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDrinkingSound, getEatingSound, getEyeHeight, getEyeHeight, getEyeLocation, getFallDamageSound, getFallDamageSoundBig, getFallDamageSoundSmall, getHandRaised, getHandRaisedTime, getHurtDirection, getHurtSound, getItemUseRemainingTime, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getTargetBlock, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockFace, getTargetBlockFace, getTargetBlockInfo, getTargetBlockInfo, getTargetEntity, getTargetEntity, getTargetEntityInfo, getTargetEntityInfo, hasAI, hasLineOfSight, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isGliding, isHandRaised, isInvisible, isJumping, isLeashed, isRiptiding, isSleeping, isSwimming, knockback, playPickupItemAnimation, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, rayTraceEntities, rayTraceEntities, removePotionEffect, setAI, setArrowCooldown, setArrowsInBody, setArrowsInBody, setArrowsStuck, setBeeStingerCooldown, setBeeStingersInBody, setBodyYaw, setCanPickupItems, setCollidable, setGliding, setHurtDirection, setInvisible, setJumping, setKiller, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSwimming, swingHand, swingMainHand, swingOffHand
Methods inherited from interface org.bukkit.loot.Lootable
clearLootTable, getLootTable, getSeed, hasLootTable, setLootTable, setLootTable, setSeed
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface org.bukkit.entity.Mob
getAmbientSound, getEquipment, getHeadRotationSpeed, getMaxHeadPitch, getPathfinder, getPossibleExperienceReward, getTarget, isAware, isInDaylight, isLeftHanded, lookAt, lookAt, lookAt, lookAt, lookAt, lookAt, setAware, setLeftHanded
Methods inherited from interface org.bukkit.Nameable
customName, customName, getCustomName, setCustomName
Methods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachment
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
Methods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointers
Methods inherited from interface org.bukkit.projectiles.ProjectileSource
launchProjectile, launchProjectile, launchProjectile
Methods inherited from interface com.destroystokyo.paper.entity.RangedEntity
isChargingAttack, rangedAttack, setChargingAttack
Methods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
Method Details
-
setTarget
Instructs this Mob to set the specified LivingEntity as its target.Hostile creatures may attack their target, and friendly creatures may follow their target.
This method will set the target of the
center head
of the wither. -
setTarget
This method will set the target of individual headsWither.Head
of the wither.- Parameters:
head
- the individual headtarget
- the entity that should be targeted
-
getTarget
This method will get the target of individual headsWither.Head
of the wither.- Parameters:
head
- the individual head- Returns:
- the entity targeted by the given head, or null if none is targeted
-
getInvulnerabilityTicks
Deprecated, for removal: This API element is subject to removal in a future version.Duplicate api, usegetInvulnerableTicks()
Returns the wither's current invulnerability ticks.- Returns:
- amount of invulnerability ticks
-
setInvulnerabilityTicks
Deprecated, for removal: This API element is subject to removal in a future version.Duplicate api, usesetInvulnerableTicks(int)
Sets the wither's current invulnerability ticks. When invulnerability ticks reach 0, the wither will trigger an explosion.- Parameters:
ticks
- amount of invulnerability ticks
-
isCharged
boolean isCharged()- Returns:
- whether the wither is charged
-
getInvulnerableTicks
int getInvulnerableTicks()- Returns:
- ticks the wither is invulnerable for
-
setInvulnerableTicks
void setInvulnerableTicks(int ticks) Sets for how long in the future, the wither should be invulnerable.- Parameters:
ticks
- ticks the wither is invulnerable for
-
canTravelThroughPortals
boolean canTravelThroughPortals()- Returns:
- whether the wither can travel through portals
-
setCanTravelThroughPortals
void setCanTravelThroughPortals(boolean value) Sets whether the wither can travel through portals.- Parameters:
value
- whether the wither can travel through portals
-
enterInvulnerabilityPhase
void enterInvulnerabilityPhase()Makes the wither invulnerable for 11 seconds and sets the health to one third of the max health.
This is called in vanilla directly after spawning the wither.
-
getInvulnerableTicks()