Class VerticalPlatformer

java.lang.Object
ua.mcchickenstudio.opencreative.utils.world.platforms.DevPlatformer
ua.mcchickenstudio.opencreative.utils.world.platforms.VerticalPlatformer
All Implemented Interfaces:
ExtensionContent

public final class VerticalPlatformer extends DevPlatformer

VerticalPlatformer

This class represents a platforms generator, that creates and returns platforms in vertical way, like old floors.
  • Constructor Details

    • VerticalPlatformer

      public VerticalPlatformer()
  • Method Details

    • setWorldBorder

      public void setWorldBorder(@NotNull @NotNull DevPlanet devPlanet)
      Description copied from class: DevPlatformer
      Sets world border for developer planet.
      Specified by:
      setWorldBorder in class DevPlatformer
      Parameters:
      devPlanet - dev planet to set border.
    • getPlatformInLocation

      @Nullable public @Nullable DevPlatform getPlatformInLocation(@NotNull @NotNull DevPlanet devPlanet, @NotNull @NotNull org.bukkit.Location location)
      Description copied from class: DevPlatformer
      Returns coding platform by location.
      Specified by:
      getPlatformInLocation in class DevPlatformer
      Parameters:
      location - location to get platform.
      Returns:
      coding platform - if location contains coding platform, otherwise - null.
    • getColumnBeginLocation

      @Nullable public @Nullable org.bukkit.Location getColumnBeginLocation(@NotNull @NotNull DevPlanet devPlanet, @NotNull @NotNull org.bukkit.Location location)
      Description copied from class: DevPlatformer
      Returns begin location of coding line by location.
      Specified by:
      getColumnBeginLocation in class DevPlatformer
      Parameters:
      location - location to get platform.
      Returns:
      executor block location - if location is related to actions or its executor location itself.
    • getFarPlatformByX

      @NotNull public @NotNull DevPlatform getFarPlatformByX(@NotNull @NotNull DevPlanet devPlanet)
      Description copied from class: DevPlatformer
      Returns the most far platform by X coordinate.
      Specified by:
      getFarPlatformByX in class DevPlatformer
      Parameters:
      devPlanet - developer planet to get platform.
      Returns:
      farthest platform by X, or coding platform placed at (1,1).
    • getFarPlatformByZ

      @NotNull public @NotNull DevPlatform getFarPlatformByZ(@NotNull @NotNull DevPlanet devPlanet)
      Description copied from class: DevPlatformer
      Returns the most far platform by Z coordinate.
      Specified by:
      getFarPlatformByZ in class DevPlatformer
      Parameters:
      devPlanet - developer planet to get platform.
      Returns:
      farthest platform by Z, or coding platform placed at (1,1).
    • getPlatforms

      @NotNull public @NotNull List<@NotNull DevPlatform> getPlatforms(@NotNull @NotNull DevPlanet devPlanet)
      Description copied from class: DevPlatformer
      Returns list of existing coding platforms, that can be used to place coding blocks.
      Specified by:
      getPlatforms in class DevPlatformer
      Parameters:
      devPlanet - developer planet to get platforms.
      Returns:
      list of developer platforms.
    • claimPlatform

      public boolean claimPlatform(@NotNull @NotNull DevPlanet devPlanet, @NotNull @NotNull DevPlatform platform)
      Description copied from class: DevPlatformer
      Claims coding platform, if it doesn't exist yet.
      Specified by:
      claimPlatform in class DevPlatformer
      Parameters:
      devPlanet - developer planet to claim platform.
      platform - coding platform to claim.
      Returns:
      true - claimed coding platform, false - already built and exists.
    • buildPlatform

      @NotNull public @NotNull CompletableFuture<Void> buildPlatform(@NotNull @NotNull DevPlatform platform, org.bukkit.Material floorMaterial, org.bukkit.Material eventMaterial, org.bukkit.Material actionMaterial)
      Description copied from class: DevPlatformer
      Builds coding platform by its coordinates. Coordinates are not from Minecraft location.
      Specified by:
      buildPlatform in class DevPlatformer
      Parameters:
      platform - platform to create.
      floorMaterial - material of block, that will be used as floor.
      eventMaterial - material of block, that will be placed as cells for event blocks placement.
      actionMaterial - material of block, that will be placed as cells for action blocks placement.
      Returns:
      true - created coding platform, false - cannot build it.
    • getPlatformBeginLocation

      @NotNull public @NotNull org.bukkit.Location getPlatformBeginLocation(@NotNull @NotNull DevPlatform platform)
      Description copied from class: DevPlatformer
      Returns location of top left corner of platform.
      Specified by:
      getPlatformBeginLocation in class DevPlatformer
      Parameters:
      platform - dev platform to get location.
      Returns:
      begin location of platform.
    • getPlatformEndLocation

      @NotNull public @NotNull org.bukkit.Location getPlatformEndLocation(@NotNull @NotNull DevPlatform platform)
      Description copied from class: DevPlatformer
      Returns location of bottom right corner of platform.
      Specified by:
      getPlatformEndLocation in class DevPlatformer
      Parameters:
      platform - dev platform to get location.
      Returns:
      end location of platform.
    • getNextAvailablePlatform

      @NotNull public @NotNull DevPlatform getNextAvailablePlatform(@NotNull @NotNull DevPlanet planet)
      Description copied from class: DevPlatformer
      Returns next platform, that will be created by player.
      Specified by:
      getNextAvailablePlatform in class DevPlatformer
      Returns:
      next available coding platform.
    • getCodingBlocksLimit

      public int getCodingBlocksLimit(@NotNull @NotNull DevPlanet planet)
      Description copied from class: DevPlatformer
      Returns maximum amount of coding blocks in 1 column. Includes executor and all actions blocks through coding line.
      Specified by:
      getCodingBlocksLimit in class DevPlatformer
      Returns:
      limit of coding blocks.
    • notDependsOnHeight

      public boolean notDependsOnHeight()
      Description copied from class: DevPlatformer
      Checks if this manager creates platforms on Z coordinate instead of Y coordinate. Useful for skipping additional checks while parsing coding blocks.
      Specified by:
      notDependsOnHeight in class DevPlatformer
      Returns:
      true - considers only Z or X coordinates, false - considers also Y.
    • getName

      @NotNull public @NotNull String getName()
      Description copied from interface: ExtensionContent
      Returns name of extension content. Will be displayed in list of extension content.
      Returns:
      name of content.
    • getDescription

      @NotNull public @NotNull String getDescription()
      Description copied from interface: ExtensionContent
      Returns description of extension content. Describes purpose of new additional content.
      Returns:
      description of content.
    • getExtensionId

      @NotNull public @NotNull String getExtensionId()
      Description copied from interface: ExtensionContent
      Returns lower-cased simple id of extension. Will be used to identify author of content.

      ID "default" is reserved for OpenCreative+ developers.

      Returns:
      id of extension.