Class DevPlatform
java.lang.Object
ua.mcchickenstudio.opencreative.planets.DevPlatform
DevPlatform
This class represents developers platform in developers world. It's a floor with columns, that are used to place coding blocks.-
Constructor Summary
ConstructorsConstructorDescriptionDevPlatform(org.bukkit.World world, int x, int z) DevPlatform(org.bukkit.World world, DevPlatformer platformer, int x, int z) DevPlatform(DevPlanet devPlanet, int x, int z) -
Method Summary
Modifier and TypeMethodDescriptionbooleancantBePlatformMaterial(org.bukkit.Material material) booleandestroyCodingBlock(@NotNull org.bukkit.Location location, boolean dropItems) Destroys event, action or condition block, its sign, additional block and container.intdestroyCodingLine(@NotNull org.bukkit.Location location, boolean dropItems) Destroys all coding blocks in line.booleanexists()org.bukkit.Materialint@Nullable IntegergetColumn(@NotNull org.bukkit.Location location) intorg.bukkit.Materialorg.bukkit.MaterialList<org.bukkit.Location> List<org.bukkit.Location> getFreeColumns(int begin) List<org.bukkit.Location> getPlacedExecutors(ExecutorCategory category) org.bukkit.Locationorg.bukkit.WorldgetWorld()intgetX()intgetZ()booleanisEmptyColumn(int column) Checks if specified column doesn't have any block.booleansetActionMaterial(org.bukkit.Material action) voidsetContainerMaterial(org.bukkit.Material containerMaterial) booleansetEventMaterial(org.bukkit.Material event) booleansetFloorMaterial(org.bukkit.Material floor) booleansetMaterials(org.bukkit.Material floor, org.bukkit.Material event, org.bukkit.Material action) voidsetSignMaterial(org.bukkit.Material signMaterial) toString()
-
Constructor Details
-
DevPlatform
-
DevPlatform
-
DevPlatform
public DevPlatform(org.bukkit.World world, int x, int z)
-
-
Method Details
-
exists
public boolean exists() -
isEmptyColumn
public boolean isEmptyColumn(int column) Checks if specified column doesn't have any block.- Parameters:
column- from 1 to 24.- Returns:
- true - column is empty, false - column has blocks.
-
getFreeColumns
-
getFreeColumns
-
getColumn
-
getFloorMaterial
public org.bukkit.Material getFloorMaterial() -
getEventMaterial
public org.bukkit.Material getEventMaterial() -
getActionMaterial
public org.bukkit.Material getActionMaterial() -
cantBePlatformMaterial
public boolean cantBePlatformMaterial(org.bukkit.Material material) -
setMaterials
public boolean setMaterials(org.bukkit.Material floor, org.bukkit.Material event, org.bukkit.Material action) -
setFloorMaterial
public boolean setFloorMaterial(org.bukkit.Material floor) -
setEventMaterial
public boolean setEventMaterial(org.bukkit.Material event) -
setActionMaterial
public boolean setActionMaterial(org.bukkit.Material action) -
setContainerMaterial
public void setContainerMaterial(org.bukkit.Material containerMaterial) -
setSignMaterial
public void setSignMaterial(org.bukkit.Material signMaterial) -
getPlacedExecutors
-
destroyCodingLine
public int destroyCodingLine(@NotNull @NotNull org.bukkit.Location location, boolean dropItems) Destroys all coding blocks in line.- Parameters:
location- location of executor block.dropItems- drop items from upper containers or not.- Returns:
- amount of destroyed coding main blocks.
-
destroyCodingBlock
public boolean destroyCodingBlock(@NotNull @NotNull org.bukkit.Location location, boolean dropItems) Destroys event, action or condition block, its sign, additional block and container. Closes opened menus related to them.- Parameters:
location- location of coding block.dropItems- drop items from upper container or not.- Returns:
- true - main part of coding block was destroyed, false - not.
-
getBeginCoordinate
public int getBeginCoordinate() -
getEndCoordinate
public int getEndCoordinate() -
getX
public int getX() -
getZ
public int getZ() -
getWorld
public org.bukkit.World getWorld() -
getSpawnLocation
public org.bukkit.Location getSpawnLocation() -
toString
-