Class GateFormat
- All Implemented Interfaces:
GateFormatAPI
-
Constructor Summary
ConstructorsConstructorDescriptionGateFormat(GateIris iris, GateFrame frame, GateControlBlock controlBlocks, String name, boolean isIronDoorBlockable, Set<org.bukkit.Material> controlMaterials) Instantiates a new gate format -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.util.BoundingBoxGet the bounding box of this gate formatList<org.bukkit.util.BlockVector> Gets the locations of this gate format's control blocksSet<org.bukkit.Material> org.bukkit.util.BlockVectorgetExit()Gets this gate format's exit blockintorg.bukkit.MaterialgetIrisMaterial(boolean getOpenMaterial) Gets the material used for this gate format's iris when in the given stateGet theGateStructureof the specified typeintgetWidth()booleanGets whether this gate format is iron door blockablebooleanmatches(VectorOperation converter, org.bukkit.Location topLeft) Checks if the structure of a physical stargate matches this one
-
Constructor Details
-
GateFormat
public GateFormat(GateIris iris, GateFrame frame, GateControlBlock controlBlocks, String name, boolean isIronDoorBlockable, Set<org.bukkit.Material> controlMaterials) Instantiates a new gate format- Parameters:
iris-The format's iris structure
frame-The format's frame structure
controlBlocks-The format's control block structure
name-The name of the new gate format
isIronDoorBlockable-Whether the gate format's iris can be blocked by a single iron door
controlMaterials- The materials to use for this gates control blocks
-
-
Method Details
-
getHeight
public int getHeight()- Specified by:
getHeightin interfaceGateFormatAPI- Returns:
the height of the format (Y axis)
-
getWidth
public int getWidth()- Specified by:
getWidthin interfaceGateFormatAPI- Returns:
The width of the format (Z axis)
-
getBoundingBox
public org.bukkit.util.BoundingBox getBoundingBox()Description copied from interface:GateFormatAPIGet the bounding box of this gate format- Specified by:
getBoundingBoxin interfaceGateFormatAPI- Returns:
The bounding box of this format
-
isIronDoorBlockable
public boolean isIronDoorBlockable()Description copied from interface:GateFormatAPIGets whether this gate format is iron door blockableIron door block-ability is defined as such: Can the Stargate's entrance be fully blocked by a single iron door?
- Specified by:
isIronDoorBlockablein interfaceGateFormatAPI- Returns:
True if iron door blockable
-
matches
Checks if the structure of a physical stargate matches this one- Specified by:
matchesin interfaceGateFormatAPI- Parameters:
converter-topLeft-The top-left location of the physical stargate to match
- Returns:
True if the stargate matches this format
-
getControlBlocks
Gets the locations of this gate format's control blocks- Specified by:
getControlBlocksin interfaceGateFormatAPI- Returns:
The locations of this gate format's control blocks
-
getIrisMaterial
public org.bukkit.Material getIrisMaterial(boolean getOpenMaterial) Description copied from interface:GateFormatAPIGets the material used for this gate format's iris when in the given state- Specified by:
getIrisMaterialin interfaceGateFormatAPI- Parameters:
getOpenMaterial-Whether to get the open-material or the closed-material
- Returns:
The material used for this gate format's iris
-
getExit
public org.bukkit.util.BlockVector getExit()Gets this gate format's exit block- Specified by:
getExitin interfaceGateFormatAPI- Returns:
This gate format's exit block
-
getFileName
- Specified by:
getFileNamein interfaceGateFormatAPI- Returns:
The name of the file this format was loaded from
-
getControlMaterials
- Returns:
The set of materials that this format can have a control on
-
getStructure
Get theGateStructureof the specified type- Specified by:
getStructurein interfaceGateFormatAPI- Parameters:
type-The specified type of
GateStructure- Returns:
The
GateStructureof the specified type
-