Class DevPlatform

java.lang.Object
ua.mcchickenstudio.opencreative.planets.DevPlatform

public class DevPlatform extends Object

DevPlatform

This class represents developers platform in developers world. It's a floor with columns, that are used to place coding blocks.
  • Constructor Details

    • DevPlatform

      public DevPlatform(DevPlanet devPlanet, int x, int z)
    • DevPlatform

      public DevPlatform(org.bukkit.World world, DevPlatformer platformer, int x, int z)
    • 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

      public List<org.bukkit.Location> getFreeColumns()
    • getFreeColumns

      public List<org.bukkit.Location> getFreeColumns(int begin)
    • getColumn

      @Nullable public @Nullable Integer getColumn(@NotNull @NotNull org.bukkit.Location location)
    • 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

      public List<org.bukkit.Location> getPlacedExecutors(ExecutorCategory category)
    • 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

      public String toString()
      Overrides:
      toString in class Object