Class GateFormatRegistry

java.lang.Object
org.sgrewritten.stargate.api.gate.GateFormatRegistry

public class GateFormatRegistry extends Object
  • Method Details

    • formatsStored

      public static int formatsStored()
      Gets the number of stored gate formats
      Returns:

      The number of stored gate formats

    • getAllGateFormatNames

      public static Set<String> getAllGateFormatNames()
      Gets the names of all known gate formats
      Returns:

      The names of all known gate formats

    • getFormat

      @Nullable public static @Nullable GateFormat getFormat(@NotNull @NotNull String gateDesignName)
      Gets the gate format corresponding to the given gate design name
      Parameters:
      gateDesignName -

      The gate design name to get the format of

      Returns:

      The gate format, or null if no such gate format

    • setFormats

      @Internal public static void setFormats(List<GateFormat> gateFormats)
      Sets the gate formats known by the gate format handler
      Parameters:
      gateFormats -

      The new list of known gate formats

    • getPossibleGateFormatsFromControlBlockMaterial

      public static List<GateFormat> getPossibleGateFormatsFromControlBlockMaterial(org.bukkit.Material signParentBlockMaterial)
      Gets all gate format using the given control block material
      Parameters:
      signParentBlockMaterial -

      The material of a placed sign's parent block

      Returns:

      All gate formats using the given control block

    • loadGateFormats

      public static void loadGateFormats(File pluginDataFolder) throws IOException, URISyntaxException
      Load all gate formats from the specified plugin data folder
      Parameters:
      pluginDataFolder -

      The folder where gate formats reside

      Throws:
      IOException -

      If unable to load one gate format

      URISyntaxException -

      Should not be thrown really