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

    Constructors
    Constructor
    Description
    StructureWorldServiceImpl​(com.github.shynixn.structureblocklib.api.service.TypeConversionService conversionService)
    Creates a new service with dependencies.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    placeStructureToWorld​(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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 Exception
      Places the blocks in the world defined by the given structure.
      Specified by:
      placeStructureToWorld in interface com.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 Exception
      Reads the blocks in the world into an NMS Structure definition.
      Specified by:
      readStructureFromWorld in interface com.github.shynixn.structureblocklib.api.service.StructureWorldService
      Parameters:
      meta - Meta data to describe the block selection.
      Returns:
      A new NMS Structure definition.
      Throws:
      Exception