Interface FakeEntity

All Superinterfaces:
net.kyori.adventure.audience.Audience, org.bukkit.command.CommandSender, org.bukkit.entity.Entity, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>, org.bukkit.metadata.Metadatable, org.bukkit.Nameable, org.bukkit.permissions.Permissible, org.bukkit.persistence.PersistentDataHolder, io.papermc.paper.persistence.PersistentDataViewHolder, net.kyori.adventure.pointer.Pointered, org.bukkit.permissions.ServerOperator, net.kyori.adventure.sound.Sound.Emitter
All Known Subinterfaces:
FakeBlockDisplay, FakeInteraction, FakeItemDisplay, FakeTextDisplay

public interface FakeEntity extends org.bukkit.entity.Entity
Represents a fake entity that exists only for the client side (players), but is not registered in the actual server world.

Fake entities are mainly used for creating custom client-side visuals, such as block displays, item displays, text displays, or interactions.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.bukkit.entity.Entity

    org.bukkit.entity.Entity.Spigot
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deletes this fake entity, removing it from all players' clients.
    org.bukkit.entity.Entity
    Gets the underlying handle of this entity.
    int
    Gets the unique entity ID assigned to this fake entity.
    void
    hide(org.bukkit.entity.Player player)
    Hides this entity from the given player.
    boolean
    Checks whether this fake entity is currently created and visible to everyone.
    void
    show(org.bukkit.entity.Player player)
    Sends this entity to the given player, making it visible on the client.
    void
    Spawns this fake entity, making it available for players to see.
    void
    update(org.bukkit.entity.Player player)
    Updates the entity state for the given player.
    Returns a set of players (by UUID) who can currently see this fake entity.

    Methods inherited from interface net.kyori.adventure.audience.Audience

    clearResourcePacks, clearTitle, 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, showTitle, stopSound, stopSound

    Methods inherited from interface org.bukkit.command.CommandSender

    getName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessage, sendRichMessage

    Methods 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, getPistonMoveReaction, getPitch, getPortalCooldown, getPose, getScheduler, getScoreboardEntryName, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, hasGravity, hasNoPhysics, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvisible, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isInWorld, isOnGround, isPersistent, isSilent, isSneaking, isTicking, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, lookAt, lookAt, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvisible, setInvulnerable, setLastDamageCause, setNoPhysics, setPassenger, setPersistent, setPortalCooldown, setPose, setPose, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, teleportAsync, wouldCollideUsing

    Methods inherited from interface net.kyori.adventure.text.event.HoverEventSource

    asHoverEvent

    Methods inherited from interface org.bukkit.metadata.Metadatable

    getMetadata, hasMetadata, removeMetadata, setMetadata

    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.permissions.ServerOperator

    isOp, setOp
  • Method Details

    • getHandle

      org.bukkit.entity.Entity getHandle()
      Gets the underlying handle of this entity. This may refer to an NMS or Bukkit representation depending on the implementation.
      Returns:
      the entity handle
    • whoSeeEntity

      Set<UUID> whoSeeEntity()
      Returns a set of players (by UUID) who can currently see this fake entity.
      Returns:
      a set of player UUIDs
    • show

      void show(org.bukkit.entity.Player player)
      Sends this entity to the given player, making it visible on the client.
      Parameters:
      player - the player to show the entity to
    • hide

      void hide(org.bukkit.entity.Player player)
      Hides this entity from the given player.
      Parameters:
      player - the player to hide the entity from
    • update

      void update(org.bukkit.entity.Player player)
      Updates the entity state for the given player. Can be used to resend metadata, position, or other properties.
      Parameters:
      player - the player to update
    • getId

      int getId()
      Gets the unique entity ID assigned to this fake entity.
      Returns:
      the entity ID
    • spawn

      void spawn()
      Spawns this fake entity, making it available for players to see.
    • delete

      void delete()
      Deletes this fake entity, removing it from all players' clients.
    • isSpawned

      boolean isSpawned()
      Checks whether this fake entity is currently created and visible to everyone.
      Returns:
      true if the entity is created, false otherwise.