Package org.bukkit.entity
Interface Bee
- All Superinterfaces:
Ageable,Animals,Attributable,Audience,Breedable,CommandSender,Creature,Damageable,DataComponentView,Entity,Frictional,HoverEventSource<HoverEvent.ShowEntity>,Leashable,LivingEntity,Lootable,Metadatable,Mob,Nameable,Permissible,PersistentDataHolder,PersistentDataViewHolder,Pointered,ProjectileSource,ServerOperator,Sound.Emitter
Represents a Bee.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.Spigot -
Method Summary
Modifier and TypeMethodDescriptionintgetAnger()Get the bee's anger level.intGet the amount of ticks the bee cannot enter the hive for.intGets how many crops this bee has grown since it last pollinated.Get the bee's flower location.getHive()Get the bee's hive location.Gets the plugin set override for if the bee is currently rolling.intGets how many ticks this bee has gone without pollinatingintGets how many ticks have passed since this bee last stung.booleanGet if the bee has nectar.booleanhasStung()Get if the bee has stung.booleanGets if the bee is currently rolling.voidsetAnger(int anger) Set the bee's new anger level.voidsetCannotEnterHiveTicks(int ticks) Set the amount of ticks the bee cannot enter a hive for.voidsetCropsGrownSincePollination(int crops) Sets how many crops this bee has grown since it last pollinated.voidSet the bee's flower location.voidsetHasNectar(boolean nectar) Set if the bee has nectar.voidsetHasStung(boolean stung) Set if the bee has stung.voidSet the bee's hive location.voidsetRollingOverride(TriState rolling) Sets the override for if the bee is currently rolling.voidsetTicksSincePollination(int ticks) Sets how many ticks this bee has gone without pollinating.voidsetTimeSinceSting(@org.checkerframework.checker.index.qual.NonNegative int time) Sets how many ticks have passed since this bee last stung.Methods inherited from interface org.bukkit.entity.Ageable
getAge, isAdult, setAdult, setAge, setBabyMethods inherited from interface org.bukkit.entity.Animals
getBreedCause, getLoveModeTicks, isBreedItem, isBreedItem, isLoveMode, setBreedCause, setLoveModeTicksMethods inherited from interface org.bukkit.attribute.Attributable
getAttribute, registerAttributeMethods inherited from interface net.kyori.adventure.audience.Audience
clearResourcePacks, clearTitle, closeDialog, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, sendResourcePacks, sendTitlePart, showBossBar, showDialog, showTitle, stopSound, stopSoundMethods inherited from interface org.bukkit.entity.Breedable
canBreed, getAgeLock, setAgeLock, setBreedMethods inherited from interface org.bukkit.command.CommandSender
getName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessage, sendRichMessageMethods inherited from interface org.bukkit.entity.Damageable
damage, damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, heal, heal, resetMaxHealth, setAbsorptionAmount, setHealth, setMaxHealthMethods inherited from interface io.papermc.paper.datacomponent.DataComponentView
getData, getDataOrDefault, hasDataMethods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, asHoverEvent, broadcastHurtAnimation, collidesAt, copy, copy, createSnapshot, eject, fromMobSpawner, getAsString, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPickItemStack, getPistonMoveReaction, getPitch, getPortalCooldown, getPose, getRider, getScheduler, getScoreboardEntryName, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getVisualFire, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, hasGravity, hasNoPhysics, hasRider, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isImmuneToFire, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvisible, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isInWorld, isOnGround, isPersistent, isRidable, isRidableInWater, isSilent, isSneaking, isTicking, isTrackedBy, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, lookAt, lookAt, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setImmuneToFire, setInvisible, setInvulnerable, setLastDamageCause, setNoPhysics, setPassenger, setPersistent, setPortalCooldown, setPose, setPose, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, teleportAsync, wouldCollideUsingMethods inherited from interface io.papermc.paper.entity.Frictional
getFrictionState, setFrictionStateMethods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEventMethods inherited from interface io.papermc.paper.entity.Leashable
getLeashHolder, isLeashed, setLeashHolderMethods inherited from interface org.bukkit.entity.LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, broadcastSlotBreak, broadcastSlotBreak, canBreatheUnderwater, canUseEquipmentSlot, clearActiveItem, clearActivePotionEffects, completeUsingActiveItem, damageItemStack, damageItemStack, getActiveItem, getActiveItemHand, getActiveItemRemainingTime, getActiveItemUsedTime, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getBeeStingerCooldown, getBeeStingersInBody, getBodyYaw, getCanPickupItems, getCategory, getCollidableExemptions, getCombatTracker, getDeathSound, getDrinkingSound, getEatingSound, getEyeHeight, getEyeHeight, getEyeLocation, getFallDamageSound, getFallDamageSoundBig, getFallDamageSoundSmall, getForwardsMovement, getHandRaised, getHandRaisedTime, getHurtDirection, getHurtSound, getItemInUse, getItemInUseTicks, getItemUseRemainingTime, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNextArrowRemoval, getNextBeeStingerRemoval, getNoActionTicks, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getSidewaysMovement, getTargetBlock, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockFace, getTargetBlockFace, getTargetBlockInfo, getTargetBlockInfo, getTargetEntity, getTargetEntity, getTargetEntityInfo, getTargetEntityInfo, getUpwardsMovement, hasActiveItem, hasAI, hasLineOfSight, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isGliding, isHandRaised, isJumping, isLeashed, isRiptiding, isSleeping, isSwimming, knockback, playHurtAnimation, playPickupItemAnimation, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, rayTraceEntities, rayTraceEntities, removePotionEffect, setActiveItemRemainingTime, setAI, setArrowCooldown, setArrowsInBody, setArrowsInBody, setArrowsStuck, setBeeStingerCooldown, setBeeStingersInBody, setBodyYaw, setCanPickupItems, setCollidable, setGliding, setHurtDirection, setItemInUseTicks, setJumping, setKiller, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNextArrowRemoval, setNextBeeStingerRemoval, setNoActionTicks, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setRiptiding, setShieldBlockingDelay, setShouldBurnInDay, setSwimming, shouldBurnInDay, startUsingItem, swingHand, swingMainHand, swingOffHandMethods inherited from interface org.bukkit.loot.Lootable
clearLootTable, getLootTable, getSeed, hasLootTable, setLootTable, setSeedMethods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.entity.Mob
getAmbientSound, getDespawnInPeacefulOverride, getEquipment, getHeadRotationSpeed, getMaxHeadPitch, getPathfinder, getPossibleExperienceReward, getTarget, isAggressive, isAware, isInDaylight, isLeftHanded, lookAt, lookAt, lookAt, lookAt, lookAt, lookAt, setAggressive, setAware, setDespawnInPeacefulOverride, setLeftHanded, setLootTable, setTarget, shouldDespawnInPeacefulMethods inherited from interface org.bukkit.Nameable
customName, customName, getCustomName, setCustomNameMethods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachmentMethods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainerMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointersMethods inherited from interface org.bukkit.projectiles.ProjectileSource
launchProjectile, launchProjectile, launchProjectileMethods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
Method Details
-
getHive
Get the bee's hive location.- Returns:
- hive location or null
-
setHive
Set the bee's hive location.- Parameters:
location- or null
-
getFlower
Get the bee's flower location.- Returns:
- flower location or null
-
setFlower
Set the bee's flower location.- Parameters:
location- or null
-
hasNectar
boolean hasNectar()Get if the bee has nectar.- Returns:
- nectar
-
setHasNectar
void setHasNectar(boolean nectar) Set if the bee has nectar.- Parameters:
nectar- whether the entity has nectar
-
hasStung
boolean hasStung()Get if the bee has stung.- Returns:
- has stung
-
setHasStung
void setHasStung(boolean stung) Set if the bee has stung.- Parameters:
stung- has stung
-
getAnger
int getAnger()Get the bee's anger level.- Returns:
- anger level
-
setAnger
void setAnger(int anger) Set the bee's new anger level.- Parameters:
anger- new anger
-
getCannotEnterHiveTicks
int getCannotEnterHiveTicks()Get the amount of ticks the bee cannot enter the hive for.- Returns:
- Ticks the bee cannot enter a hive for
-
setCannotEnterHiveTicks
void setCannotEnterHiveTicks(int ticks) Set the amount of ticks the bee cannot enter a hive for.- Parameters:
ticks- Ticks the bee cannot enter a hive for
-
setRollingOverride
Sets the override for if the bee is currently rolling.- Parameters:
rolling- is rolling, or unset for vanilla behavior
-
getRollingOverride
Gets the plugin set override for if the bee is currently rolling.- Returns:
- plugin set rolling override
-
isRolling
boolean isRolling()Gets if the bee is currently rolling.- Returns:
- is rolling
-
setCropsGrownSincePollination
void setCropsGrownSincePollination(int crops) Sets how many crops this bee has grown since it last pollinated.- Parameters:
crops- number of crops
-
getCropsGrownSincePollination
int getCropsGrownSincePollination()Gets how many crops this bee has grown since it last pollinated.- Returns:
- number of crops
-
setTicksSincePollination
void setTicksSincePollination(int ticks) Sets how many ticks this bee has gone without pollinating.- Parameters:
ticks- number of ticks
-
getTicksSincePollination
int getTicksSincePollination()Gets how many ticks this bee has gone without pollinating- Returns:
- number of ticks
-
setTimeSinceSting
void setTimeSinceSting(@org.checkerframework.checker.index.qual.NonNegative int time) Sets how many ticks have passed since this bee last stung. This value is used to determine when the bee should die after stinging.Note that bees don’t die at a fixed time. Instead, every few ticks, they have a random chance of dying, and that chance increases with this value.
- Parameters:
time- number of ticks since last sting
-
getTimeSinceSting
int getTimeSinceSting()Gets how many ticks have passed since this bee last stung. This value increases each tick after the bee stings and is used to determine when the bee should die.Note that bees don’t die at a fixed time. Instead, every few ticks, they have a random chance of dying, and that chance increases with this value.
- Returns:
- number of ticks since last sting
-