Class AsyncServerDataFixerRemoveBlockEntityEvent
java.lang.Object
org.bukkit.event.Event
io.papermc.paper.event.server.AsyncServerDataFixerRemoveBlockEntityEvent
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class Event
Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionAsyncServerDataFixerRemoveBlockEntityEvent(Key worldKey, Key blockEntityType, BlockPosition blockPosition, PersistentDataContainerView persistentDataContainerView) -
Method Summary
Modifier and TypeMethodDescriptionReturns the key representing the no longer existing block entity type.Returns the position of the block entity that was removed.static HandlerListReturns an immutable view of the persistent data container that was attached to the removed block entity.Returns the key of the world this block entity was removed from.Methods inherited from class Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
AsyncServerDataFixerRemoveBlockEntityEvent
@Internal public AsyncServerDataFixerRemoveBlockEntityEvent(Key worldKey, Key blockEntityType, BlockPosition blockPosition, PersistentDataContainerView persistentDataContainerView)
-
-
Method Details
-
getBlockEntityType
Returns the key representing the no longer existing block entity type.- Returns:
- the key representing the no longer existing block entity type
-
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
Returns the position of the block entity that was removed.- Returns:
- the position of the block entity that was removed
-
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
- Specified by:
getHandlersin classEvent
-
getHandlerList
-