类 AsyncStructureGenerateEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.world.WorldEvent
org.bukkit.event.world.AsyncStructureGenerateEvent

@Experimental public class AsyncStructureGenerateEvent extends WorldEvent
This event will sometimes fire synchronously, depending on how it was triggered.

The constructor provides a boolean to indicate if the event was fired synchronously or asynchronously. When asynchronous, this event can be called from any thread, sans the main thread, and has limited access to the API.

If a Structure is naturally placed in a chunk of the world, this event will be asynchronous. If a player executes the '/place structure' command, this event will be synchronous. Allows to register transformers that can modify the blocks placed and entities spawned by the structure.

Care should be taken to check Event.isAsynchronous() and treat the event appropriately.