Class StructureBlockLib

java.lang.Object
com.github.shynixn.structureblocklib.api.bukkit.StructureBlockLib
All Implemented Interfaces:
StructureBlockLibApi

public class StructureBlockLib extends Object implements StructureBlockLibApi
Api Bukkit implementation.
  • Constructor Details

    • StructureBlockLib

      public StructureBlockLib()
      Init.
  • Method Details

    • getStructureBlockAt

      public <T extends StructureBlock> T getStructureBlockAt(org.bukkit.Location location, org.bukkit.plugin.Plugin plugin)
      Gets or creates a StructureBlock at the given location. This instance hides all structure modes and can be access via simple type casting. StructureBlockSave save = (StructureBlockSave) structureBlock; etc.
      Specified by:
      getStructureBlockAt in interface StructureBlockLibApi
      Type Parameters:
      T - Type extending structure block.
      Parameters:
      location - Location of the block in the world.
      plugin - Plugin instance using this API.
      Returns:
      A new instance of the StructureBlock.
    • saveStructure

      public StructureSaver saveStructure(org.bukkit.plugin.Plugin plugin)
      Creates a new instance of the StructureSaver for saving structures from a minecraft world into a target.
      Specified by:
      saveStructure in interface StructureBlockLibApi
      Parameters:
      plugin - Plugin instance using this API.
      Returns:
      A new instance of the StructureSaver.
    • loadStructure

      public StructureLoader loadStructure(org.bukkit.plugin.Plugin plugin)
      Creates a new instance of the StructureLoader for loading structures from a source into the minecraft world.
      Specified by:
      loadStructure in interface StructureBlockLibApi
      Parameters:
      plugin - Plugin instance using this API.
      Returns:
      A new instance of the StructureLoader.