Class StructureWorldServiceImpl
java.lang.Object
com.github.shynixn.structureblocklib.bukkit.v1_17_R1.StructureWorldServiceImpl
- All Implemented Interfaces:
com.github.shynixn.structureblocklib.api.service.StructureWorldService
public class StructureWorldServiceImpl
extends Object
implements com.github.shynixn.structureblocklib.api.service.StructureWorldService
Implementation to interact with structures in the world.
-
Constructor Summary
ConstructorsConstructorDescriptionStructureWorldServiceImpl(com.github.shynixn.structureblocklib.api.service.TypeConversionService conversionService)Creates a new service with dependencies. -
Method Summary
Modifier and TypeMethodDescriptionvoidplaceStructureToWorld(com.github.shynixn.structureblocklib.api.entity.StructurePlaceMeta meta, Object structure)Places the blocks in the world defined by the given structure.readStructureFromWorld(com.github.shynixn.structureblocklib.api.entity.StructureReadMeta meta)Reads the blocks in the world into an NMS Structure definition.
-
Constructor Details
-
StructureWorldServiceImpl
public StructureWorldServiceImpl(com.github.shynixn.structureblocklib.api.service.TypeConversionService conversionService)Creates a new service with dependencies.- Parameters:
conversionService- dependency.
-
-
Method Details
-
placeStructureToWorld
public void placeStructureToWorld(com.github.shynixn.structureblocklib.api.entity.StructurePlaceMeta meta, Object structure) throws ExceptionPlaces the blocks in the world defined by the given structure.- Specified by:
placeStructureToWorldin interfacecom.github.shynixn.structureblocklib.api.service.StructureWorldService- Parameters:
meta- Meta data to describe the placement.structure- NMS structure.- Throws:
Exception
-
readStructureFromWorld
public Object readStructureFromWorld(com.github.shynixn.structureblocklib.api.entity.StructureReadMeta meta) throws ExceptionReads the blocks in the world into an NMS Structure definition.- Specified by:
readStructureFromWorldin interfacecom.github.shynixn.structureblocklib.api.service.StructureWorldService- Parameters:
meta- Meta data to describe the block selection.- Returns:
- A new NMS Structure definition.
- Throws:
Exception
-