Interface IBukkitAdapter

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

public interface IBukkitAdapter
  • Method Summary

    Modifier and Type
    Method
    Description
    default <B extends com.sk89q.worldedit.world.block.BlockStateHolder<B>>
    BlockData
    adapt(B block)
    Create a Bukkit BlockData from a WorldEdit BlockStateHolder
    default ItemStack
    adapt(com.sk89q.worldedit.blocks.BaseItemStack item)
    Create a Bukkit ItemStack from a WorldEdit BaseItemStack
    default Player
    adapt(com.sk89q.worldedit.entity.Player player)
    Create a Bukkit Player from a WorldEdit Player.
    default Biome
    adapt(com.sk89q.worldedit.world.biome.BiomeType biomeType)
     
    default Material
    adapt(com.sk89q.worldedit.world.block.BlockType blockType)
    Create a Bukkit Material form a WorldEdit BlockType
    default EntityType
    adapt(com.sk89q.worldedit.world.entity.EntityType entityType)
     
    default Material
    adapt(com.sk89q.worldedit.world.item.ItemType itemType)
    Create a Bukkit Material form a WorldEdit ItemType
    default World
    adapt(com.sk89q.worldedit.world.World world)
    Create a Bukkit world from a WorldEdit world.
    default com.sk89q.worldedit.world.biome.BiomeType
    adapt(Biome biome)
     
    default com.sk89q.worldedit.world.block.BlockState
    adapt(BlockData blockData)
    Create a WorldEdit BlockStateHolder from a Bukkit BlockData
    default com.sk89q.worldedit.entity.Entity
    adapt(Entity entity)
    Create a WorldEdit entity from a Bukkit entity.
    default com.sk89q.worldedit.world.entity.EntityType
    adapt(EntityType entityType)
    Create a WorldEdit EntityType from a Bukkit one.
    default BukkitPlayer
    adapt(Player player)
    Create a WorldEdit Player from a Bukkit Player.
    default com.sk89q.worldedit.world.gamemode.GameMode
    adapt(GameMode gameMode)
    Create a WorldEdit GameMode from a Bukkit one.
    default com.sk89q.worldedit.blocks.BaseItemStack
    adapt(ItemStack itemStack)
    Create a WorldEdit BaseItemStack from a Bukkit ItemStack
    default com.sk89q.worldedit.world.World
    adapt(World world)
    Create a WorldEdit world from a Bukkit world.
    default Location
    adapt(World world, com.sk89q.worldedit.math.BlockVector3 position)
     
    default Location
    adapt(World world, com.sk89q.worldedit.math.Vector3 position)
    Create a Bukkit location from a WorldEdit position with a Bukkit world.
    default Location
    adapt(World world, com.sk89q.worldedit.util.Location location)
    Create a Bukkit location from a WorldEdit location with a Bukkit world.
    default com.sk89q.worldedit.world.block.BlockState
    Create a WorldEdit BlockStateHolder from a Bukkit ItemStack
    default com.sk89q.worldedit.world.block.BlockType
    Converts a Material to a BlockType
    default com.sk89q.worldedit.math.BlockVector3
    Create a WorldEdit BlockVector from a Bukkit location.
    default BukkitWorld
    asBukkitWorld(com.sk89q.worldedit.world.World world)
    Convert any WorldEdit world into an equivalent wrapped Bukkit world.
    default com.sk89q.worldedit.world.item.ItemType
    asItemType(Material material)
    Converts a Material to a ItemType
    default com.sk89q.worldedit.math.Vector3
    asVector(Location location)
    Create a WorldEdit Vector from a Bukkit location.
    default boolean
    equals(com.sk89q.worldedit.world.block.BlockType blockType, Material type)
    Checks equality between a WorldEdit BlockType and a Bukkit Material
    default boolean
    generateTree(com.sk89q.worldedit.util.TreeGenerator.TreeType type, com.sk89q.worldedit.EditSession editSession, com.sk89q.worldedit.math.BlockVector3 pt, World world)
    Generate a given tree type to the given editsession.
    default List<Entity>
    Retrieve the list of Bukkit entities (Entity) in the given world.
  • Method Details

    • asBukkitWorld

      default BukkitWorld asBukkitWorld(com.sk89q.worldedit.world.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(com.sk89q.worldedit.world.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, com.sk89q.worldedit.math.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, com.sk89q.worldedit.math.BlockVector3 position)
    • adapt

      default Location adapt(World world, com.sk89q.worldedit.util.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 com.sk89q.worldedit.math.Vector3 asVector(Location location)
      Create a WorldEdit Vector from a Bukkit location.
      Parameters:
      location - The Bukkit location
      Returns:
      a WorldEdit vector
    • asBlockVector

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

      default com.sk89q.worldedit.entity.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(com.sk89q.worldedit.world.item.ItemType itemType)
      Create a Bukkit Material form a WorldEdit ItemType
      Parameters:
      itemType - The WorldEdit ItemType
      Returns:
      The Bukkit Material
    • adapt

      default Material adapt(com.sk89q.worldedit.world.block.BlockType blockType)
      Create a Bukkit Material form a WorldEdit BlockType
      Parameters:
      blockType - The WorldEdit BlockType
      Returns:
      The Bukkit Material
    • adapt

      default EntityType adapt(com.sk89q.worldedit.world.entity.EntityType entityType)
    • asBlockType

      default com.sk89q.worldedit.world.block.BlockType asBlockType(Material material)
      Converts a Material to a BlockType
      Parameters:
      material - The material
      Returns:
      The blocktype
    • asItemType

      default com.sk89q.worldedit.world.item.ItemType asItemType(Material material)
      Converts a Material to a ItemType
      Parameters:
      material - The material
      Returns:
      The itemtype
    • adapt

      default com.sk89q.worldedit.world.block.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 com.sk89q.worldedit.world.block.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 com.sk89q.worldedit.blocks.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(com.sk89q.worldedit.blocks.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(com.sk89q.worldedit.entity.Player player)
      Create a Bukkit Player from a WorldEdit Player.
      Parameters:
      player - The WorldEdit player
      Returns:
      The Bukkit player
    • adapt

      default Biome adapt(com.sk89q.worldedit.world.biome.BiomeType biomeType)
    • adapt

      default com.sk89q.worldedit.world.biome.BiomeType adapt(Biome biome)
    • equals

      default boolean equals(com.sk89q.worldedit.world.block.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 com.sk89q.worldedit.world.World adapt(World world)
      Create a WorldEdit world from a Bukkit world.
      Parameters:
      world - the Bukkit world
      Returns:
      a WorldEdit world
    • adapt

      default com.sk89q.worldedit.world.gamemode.GameMode adapt(GameMode gameMode)
      Create a WorldEdit GameMode from a Bukkit one.
      Parameters:
      gameMode - Bukkit GameMode
      Returns:
      WorldEdit GameMode
    • adapt

      default com.sk89q.worldedit.world.entity.EntityType adapt(EntityType entityType)
      Create a WorldEdit EntityType from a Bukkit one.
      Parameters:
      entityType - Bukkit EntityType
      Returns:
      WorldEdit EntityType
    • asBlockState

      default com.sk89q.worldedit.world.block.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(com.sk89q.worldedit.util.TreeGenerator.TreeType type, com.sk89q.worldedit.EditSession editSession, com.sk89q.worldedit.math.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