# 接口的使用
org.bukkit.structure.Structure

使用Structure的程序包
程序包
说明
org.bukkit.structure
Classes related to creating or using `structures` without creating `Structure blocks` in the world.

- ## org.bukkit.structure中Structure的使用

  返回Structure的org.bukkit.structure中的方法
  修饰符和类型
  方法
  说明
  `@NotNull Structure`
  StructureManager.`copy(@NotNull Structure structure)`
  Creates a copy of this structure.
  `@NotNull Structure`
  StructureManager.`createStructure()`
  Creates a new empty structure.
  `@Nullable Structure`
  StructureManager.`getStructure(@NotNull NamespacedKey structureKey)`
  Gets a registered Structure.
  `@NotNull Structure`
  StructureManager.`loadStructure(@NotNull File file)`
  Reads a Structure from disk.
  `@NotNull Structure`
  StructureManager.`loadStructure(@NotNull InputStream inputStream)`
  Reads a Structure from a stream.
  `@Nullable Structure`
  StructureManager.`loadStructure(@NotNull NamespacedKey structureKey)`
  Loads the structure for the specified key and automatically registers it.
  `@Nullable Structure`
  StructureManager.`loadStructure(@NotNull NamespacedKey structureKey, boolean register)`
  Loads a structure for the specified key and optionally `registers` it.
  `@Nullable Structure`
  StructureManager.`registerStructure(@NotNull NamespacedKey structureKey, @NotNull Structure structure)`
  Registers the given structure.
  `@Nullable Structure`
  StructureManager.`unregisterStructure(@NotNull NamespacedKey structureKey)`
  Unregisters a structure.
  返回变量类型为Structure的类型的org.bukkit.structure中的方法
  修饰符和类型
  方法
  说明
  `@NotNull Map<NamespacedKey,Structure>`
  StructureManager.`getStructures()`
  Gets the currently registered structures.
  参数类型为Structure的org.bukkit.structure中的方法
  修饰符和类型
  方法
  说明
  `@NotNull Structure`
  StructureManager.`copy(@NotNull Structure structure)`
  Creates a copy of this structure.
  `@Nullable Structure`
  StructureManager.`registerStructure(@NotNull NamespacedKey structureKey, @NotNull Structure structure)`
  Registers the given structure.
  `void`
  StructureManager.`saveStructure(@NotNull File file, @NotNull Structure structure)`
  Save a structure to a file.
  `void`
  StructureManager.`saveStructure(@NotNull OutputStream outputStream, @NotNull Structure structure)`
  Save a structure to a stream.
  `void`
  StructureManager.`saveStructure(@NotNull NamespacedKey structureKey, @NotNull Structure structure)`
  Saves a structure with a given key to the primary world folder.