Interface IBukkitAdapter
- All Known Subinterfaces:
BukkitImplAdapter<T>
,IDelegateBukkitImplAdapter<T>
- All Known Implementing Classes:
CachedBukkitAdapter
,FaweAdapter
,SimpleBukkitAdapter
public interface IBukkitAdapter
-
Method Summary
Modifier and TypeMethodDescriptiondefault <B extends BlockStateHolder<B>>
BlockDataadapt
(B block) Create a Bukkit BlockData from a WorldEdit BlockStateHolderdefault ItemStack
adapt
(BaseItemStack item) Create a Bukkit ItemStack from a WorldEdit BaseItemStackdefault Player
Create a Bukkit Player from a WorldEdit Player.default Biome
default Material
Create a Bukkit Material form a WorldEdit BlockTypedefault EntityType
adapt
(EntityType entityType) default Material
Create a Bukkit Material form a WorldEdit ItemTypedefault World
Create a Bukkit world from a WorldEdit world.default BiomeType
default BlockState
Create a WorldEdit BlockStateHolder from a Bukkit BlockDatadefault Entity
Create a WorldEdit entity from a Bukkit entity.default EntityType
adapt
(EntityType entityType) Create a WorldEdit EntityType from a Bukkit one.default BukkitPlayer
Create a WorldEdit Player from a Bukkit Player.default GameMode
Create a WorldEdit GameMode from a Bukkit one.default BaseItemStack
Create a WorldEdit BaseItemStack from a Bukkit ItemStackdefault World
Create a WorldEdit world from a Bukkit world.default Location
adapt
(World world, BlockVector3 position) default Location
Create a Bukkit location from a WorldEdit position with a Bukkit world.default Location
Create a Bukkit location from a WorldEdit location with a Bukkit world.default BlockState
asBlockState
(ItemStack itemStack) Create a WorldEdit BlockStateHolder from a Bukkit ItemStackdefault BlockType
asBlockType
(Material material) Converts a Material to a BlockTypedefault BlockVector3
asBlockVector
(Location location) Create a WorldEdit BlockVector from a Bukkit location.default BukkitWorld
asBukkitWorld
(World world) Convert any WorldEdit world into an equivalent wrapped Bukkit world.default ItemType
asItemType
(Material material) Converts a Material to a ItemTypedefault Vector3
Create a WorldEdit Vector from a Bukkit location.default boolean
Checks equality between a WorldEdit BlockType and a Bukkit Materialdefault boolean
generateTree
(TreeGenerator.TreeType type, EditSession editSession, BlockVector3 pt, World world) Generate a given tree type to the given editsession.getEntities
(World world) Retrieve the list of Bukkit entities (Entity
) in the given world.
-
Method Details
-
asBukkitWorld
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
Create a Bukkit world from a WorldEdit world.- Parameters:
world
- the WorldEdit world- Returns:
- a Bukkit world
-
adapt
Create a Bukkit location from a WorldEdit position with a Bukkit world.- Parameters:
world
- the Bukkit worldposition
- the WorldEdit position- Returns:
- a Bukkit location
-
adapt
-
adapt
Create a Bukkit location from a WorldEdit location with a Bukkit world.- Parameters:
world
- the Bukkit worldlocation
- the WorldEdit location- Returns:
- a Bukkit location
-
asVector
Create a WorldEdit Vector from a Bukkit location.- Parameters:
location
- The Bukkit location- Returns:
- a WorldEdit vector
-
asBlockVector
Create a WorldEdit BlockVector from a Bukkit location.- Parameters:
location
- The Bukkit location- Returns:
- a WorldEdit vector
-
adapt
Create a WorldEdit entity from a Bukkit entity.- Parameters:
entity
- the Bukkit entity- Returns:
- a WorldEdit entity
-
adapt
Create a Bukkit Material form a WorldEdit ItemType- Parameters:
itemType
- The WorldEdit ItemType- Returns:
- The Bukkit Material
-
adapt
Create a Bukkit Material form a WorldEdit BlockType- Parameters:
blockType
- The WorldEdit BlockType- Returns:
- The Bukkit Material
-
adapt
-
asBlockType
Converts a Material to a BlockType- Parameters:
material
- The material- Returns:
- The blocktype
-
asItemType
Converts a Material to a ItemType- Parameters:
material
- The material- Returns:
- The itemtype
-
adapt
Create a WorldEdit BlockStateHolder from a Bukkit BlockData- Parameters:
blockData
- The Bukkit BlockData- Returns:
- The WorldEdit BlockState
-
adapt
Create a Bukkit BlockData from a WorldEdit BlockStateHolder- Parameters:
block
- The WorldEdit BlockStateHolder- Returns:
- The Bukkit BlockData
-
adapt
Create a WorldEdit BaseItemStack from a Bukkit ItemStack- Parameters:
itemStack
- The Bukkit ItemStack- Returns:
- The WorldEdit BaseItemStack
-
adapt
Create a Bukkit ItemStack from a WorldEdit BaseItemStack- Parameters:
item
- The WorldEdit BaseItemStack- Returns:
- The Bukkit ItemStack
-
adapt
Create a WorldEdit Player from a Bukkit Player.- Parameters:
player
- The Bukkit player- Returns:
- The WorldEdit player
-
adapt
Create a Bukkit Player from a WorldEdit Player.- Parameters:
player
- The WorldEdit player- Returns:
- The Bukkit player
-
adapt
-
adapt
-
equals
Checks equality between a WorldEdit BlockType and a Bukkit Material- Parameters:
blockType
- The WorldEdit BlockTypetype
- The Bukkit Material- Returns:
- If they are equal
-
adapt
Create a WorldEdit world from a Bukkit world.- Parameters:
world
- the Bukkit world- Returns:
- a WorldEdit world
-
adapt
Create a WorldEdit GameMode from a Bukkit one.- Parameters:
gameMode
- Bukkit GameMode- Returns:
- WorldEdit GameMode
-
adapt
Create a WorldEdit EntityType from a Bukkit one.- Parameters:
entityType
- Bukkit EntityType- Returns:
- WorldEdit EntityType
-
asBlockState
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 generateeditSession
- Editsession to set blocks topt
- Point to generate tree atworld
- World to "generate" tree from (seed-wise)- Returns:
- If successsful
-
getEntities
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
-