Interface IBukkitAdapter

All Known Subinterfaces:
BukkitImplAdapter<T>, IDelegateBukkitImplAdapter<T>
All Known Implementing Classes:
CachedBukkitAdapter, SimpleBukkitAdapter

public interface IBukkitAdapter
  • Method Details

    • asBukkitWorld

      default BukkitWorld asBukkitWorld(World world)
      Convert any WorldEdit world into an equivalent wrapped Bukkit world.

      If a matching world cannot be found, a RuntimeException will be thrown.

      Parameters:
      world - the world
      Returns:
      a wrapped Bukkit world
    • adapt

      default World adapt(World world)
      Create a Bukkit world from a WorldEdit world.
      Parameters:
      world - the WorldEdit world
      Returns:
      a Bukkit world
    • adapt

      default Location adapt(World world, Vector3 position)
      Create a Bukkit location from a WorldEdit position with a Bukkit world.
      Parameters:
      world - the Bukkit world
      position - the WorldEdit position
      Returns:
      a Bukkit location
    • adapt

      default Location adapt(World world, BlockVector3 position)
    • adapt

      default Location adapt(World world, Location location)
      Create a Bukkit location from a WorldEdit location with a Bukkit world.
      Parameters:
      world - the Bukkit world
      location - the WorldEdit location
      Returns:
      a Bukkit location
    • asVector

      default Vector3 asVector(Location location)
      Create a WorldEdit Vector from a Bukkit location.
      Parameters:
      location - The Bukkit location
      Returns:
      a WorldEdit vector
    • asBlockVector

      default BlockVector3 asBlockVector(Location location)
      Create a WorldEdit BlockVector from a Bukkit location.
      Parameters:
      location - The Bukkit location
      Returns:
      a WorldEdit vector
    • adapt

      default Entity adapt(Entity entity)
      Create a WorldEdit entity from a Bukkit entity.
      Parameters:
      entity - the Bukkit entity
      Returns:
      a WorldEdit entity
    • adapt

      default Material adapt(ItemType itemType)
      Create a Bukkit Material form a WorldEdit ItemType
      Parameters:
      itemType - The WorldEdit ItemType
      Returns:
      The Bukkit Material
    • adapt

      default Material adapt(BlockType blockType)
      Create a Bukkit Material form a WorldEdit BlockType
      Parameters:
      blockType - The WorldEdit BlockType
      Returns:
      The Bukkit Material
    • adapt

      default EntityType adapt(EntityType entityType)
    • asBlockType

      default BlockType asBlockType(Material material)
      Converts a Material to a BlockType
      Parameters:
      material - The material
      Returns:
      The blocktype
    • asItemType

      default ItemType asItemType(Material material)
      Converts a Material to a ItemType
      Parameters:
      material - The material
      Returns:
      The itemtype
    • adapt

      default BlockState adapt(BlockData blockData)
      Create a WorldEdit BlockStateHolder from a Bukkit BlockData
      Parameters:
      blockData - The Bukkit BlockData
      Returns:
      The WorldEdit BlockState
    • adapt

      default <B extends BlockStateHolder<B>> BlockData adapt(B block)
      Create a Bukkit BlockData from a WorldEdit BlockStateHolder
      Parameters:
      block - The WorldEdit BlockStateHolder
      Returns:
      The Bukkit BlockData
    • adapt

      default BaseItemStack adapt(ItemStack itemStack)
      Create a WorldEdit BaseItemStack from a Bukkit ItemStack
      Parameters:
      itemStack - The Bukkit ItemStack
      Returns:
      The WorldEdit BaseItemStack
    • adapt

      default ItemStack adapt(BaseItemStack item)
      Create a Bukkit ItemStack from a WorldEdit BaseItemStack
      Parameters:
      item - The WorldEdit BaseItemStack
      Returns:
      The Bukkit ItemStack
    • adapt

      default BukkitPlayer adapt(Player player)
      Create a WorldEdit Player from a Bukkit Player.
      Parameters:
      player - The Bukkit player
      Returns:
      The WorldEdit player
    • adapt

      default Player adapt(Player player)
      Create a Bukkit Player from a WorldEdit Player.
      Parameters:
      player - The WorldEdit player
      Returns:
      The Bukkit player
    • adapt

      default Biome adapt(BiomeType biomeType)
    • adapt

      default BiomeType adapt(Biome biome)
    • equals

      default boolean equals(BlockType blockType, Material type)
      Checks equality between a WorldEdit BlockType and a Bukkit Material
      Parameters:
      blockType - The WorldEdit BlockType
      type - The Bukkit Material
      Returns:
      If they are equal
    • adapt

      default World adapt(World world)
      Create a WorldEdit world from a Bukkit world.
      Parameters:
      world - the Bukkit world
      Returns:
      a WorldEdit world
    • adapt

      default GameMode adapt(GameMode gameMode)
      Create a WorldEdit GameMode from a Bukkit one.
      Parameters:
      gameMode - Bukkit GameMode
      Returns:
      WorldEdit GameMode
    • adapt

      default EntityType adapt(EntityType entityType)
      Create a WorldEdit EntityType from a Bukkit one.
      Parameters:
      entityType - Bukkit EntityType
      Returns:
      WorldEdit EntityType
    • asBlockState

      default BlockState asBlockState(ItemStack itemStack)
      Create a WorldEdit BlockStateHolder from a Bukkit ItemStack
      Parameters:
      itemStack - The Bukkit ItemStack
      Returns:
      The WorldEdit BlockState
    • generateTree

      default boolean generateTree(TreeGenerator.TreeType type, EditSession editSession, BlockVector3 pt, World world)
      Generate a given tree type to the given editsession.
      Parameters:
      type - Type of tree to generate
      editSession - Editsession to set blocks to
      pt - Point to generate tree at
      world - World to "generate" tree from (seed-wise)
      Returns:
      If successsful
    • getEntities

      default List<Entity> getEntities(World world)
      Retrieve the list of Bukkit entities (Entity) in the given world. If overridden by adapters will attempt retrieval asynchronously.
      Parameters:
      world - world to retrieve entities in
      Returns:
      list of Entity