Class AsyncServerDataFixerRemoveBlockEntityEvent

java.lang.Object
org.bukkit.event.Event
io.papermc.paper.event.server.AsyncServerDataFixerRemoveBlockEntityEvent

@NullMarked public class AsyncServerDataFixerRemoveBlockEntityEvent extends Event
This event is emitted by the server when the data fixer is removing a block entity associated with a block due to the block entity type no longer existing in this minecraft version.

Notable examples include the removal of the bed block entity in 26.2.

WARNING: While this event is prefixed with 'Async' it is executed as part of the chunk loading process. It may hence either execute on the chunk loading worker threads or the servers main thread, if a chunk load is executed there. In either case, heavy or blocking work is strongly discouraged to ensure the server runs smoothly. This is also applicable for the chunk loading worker threads, which the server main thread might be blocking on. Schedule large amount of work into separate thread pools.

Since:
26.2
  • Constructor Details

    • AsyncServerDataFixerRemoveBlockEntityEvent

      @Internal public AsyncServerDataFixerRemoveBlockEntityEvent(net.kyori.adventure.key.Key worldKey, net.kyori.adventure.key.Key blockEntityType, BlockPosition blockPosition, PersistentDataContainerView persistentDataContainerView)
  • Method Details

    • getBlockEntityType

      public net.kyori.adventure.key.Key getBlockEntityType()
      Returns the key representing the no longer existing block entity type.
      Returns:
      the key representing the no longer existing block entity type
      Since:
      26.2
    • getWorldKey

      public net.kyori.adventure.key.Key getWorldKey()
      Returns the key of the world this block entity was removed from.
      Returns:
      the key of the world this block entity was removed from
      Since:
      26.2
      See Also:
    • getBlockPosition

      public BlockPosition getBlockPosition()
      Returns the position of the block entity that was removed.
      Returns:
      the position of the block entity that was removed
      Since:
      26.2
    • getPersistentDataContainerView

      public PersistentDataContainerView getPersistentDataContainerView()
      Returns an immutable view of the persistent data container that was attached to the removed block entity.
      Returns:
      an immutable view of the persistent data container that was attached to the removed block entity
      Since:
      26.2
    • getHandlers

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
      Since:
      26.2
    • getHandlerList

      public static HandlerList getHandlerList()
      Since:
      26.2