Class GateFormatRegistry
java.lang.Object
org.sgrewritten.stargate.api.gate.GateFormatRegistry
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
Gets the number of stored gate formatsGets the names of all known gate formatsstatic @Nullable GateFormat
Gets the gate format corresponding to the given gate design namestatic List
<GateFormat> getPossibleGateFormatsFromControlBlockMaterial
(org.bukkit.Material signParentBlockMaterial) Gets all gate format using the given control block materialstatic void
loadGateFormats
(File pluginDataFolder) Load all gate formats from the specified plugin data folderstatic void
setFormats
(List<GateFormat> gateFormats) Sets the gate formats known by the gate format handler
-
Method Details
-
formatsStored
public static int formatsStored()Gets the number of stored gate formats- Returns:
The number of stored gate formats
-
getAllGateFormatNames
Gets the names of all known gate formats- Returns:
The names of all known gate formats
-
getFormat
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
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
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
-