Class GateFormat
- All Implemented Interfaces:
GateFormatAPI
-
Constructor Summary
ConstructorDescriptionGateFormat
(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.BoundingBox
Get 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.BlockVector
getExit()
Gets this gate format's exit blockint
org.bukkit.Material
getIrisMaterial
(boolean getOpenMaterial) Gets the material used for this gate format's iris when in the given stateGet theGateStructure
of the specified typeint
getWidth()
boolean
Gets whether this gate format is iron door blockableboolean
matches
(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:
getHeight
in interfaceGateFormatAPI
- Returns:
the height of the format (Y axis)
-
getWidth
public int getWidth()- Specified by:
getWidth
in interfaceGateFormatAPI
- Returns:
The width of the format (Z axis)
-
getBoundingBox
public org.bukkit.util.BoundingBox getBoundingBox()Description copied from interface:GateFormatAPI
Get the bounding box of this gate format- Specified by:
getBoundingBox
in interfaceGateFormatAPI
- Returns:
The bounding box of this format
-
isIronDoorBlockable
public boolean isIronDoorBlockable()Description copied from interface:GateFormatAPI
Gets 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:
isIronDoorBlockable
in interfaceGateFormatAPI
- Returns:
True if iron door blockable
-
matches
Checks if the structure of a physical stargate matches this one- Specified by:
matches
in 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:
getControlBlocks
in interfaceGateFormatAPI
- Returns:
The locations of this gate format's control blocks
-
getIrisMaterial
public org.bukkit.Material getIrisMaterial(boolean getOpenMaterial) Description copied from interface:GateFormatAPI
Gets the material used for this gate format's iris when in the given state- Specified by:
getIrisMaterial
in 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:
getExit
in interfaceGateFormatAPI
- Returns:
This gate format's exit block
-
getFileName
- Specified by:
getFileName
in 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 theGateStructure
of the specified type- Specified by:
getStructure
in interfaceGateFormatAPI
- Parameters:
type
-The specified type of
GateStructure
- Returns:
The
GateStructure
of the specified type
-