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.

  • Constructor Details

  • Method Details

    • getBlockEntityType

      public Key getBlockEntityType()
      Returns the key representing the no longer existing block entity type.
      Returns:
      the key representing the no longer existing block entity type
    • getWorldKey

      public 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
      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
    • 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
    • getHandlers

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

      public static HandlerList getHandlerList()