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 ItemStackadapt(BaseItemStack item) Create a Bukkit ItemStack from a WorldEdit BaseItemStackdefault PlayerCreate a Bukkit Player from a WorldEdit Player.default Biomedefault MaterialCreate a Bukkit Material form a WorldEdit BlockTypedefault EntityTypeadapt(EntityType entityType) default MaterialCreate a Bukkit Material form a WorldEdit ItemTypedefault WorldCreate a Bukkit world from a WorldEdit world.default BiomeTypedefault BlockStateCreate a WorldEdit BlockStateHolder from a Bukkit BlockDatadefault EntityCreate a WorldEdit entity from a Bukkit entity.default EntityTypeadapt(EntityType entityType) Create a WorldEdit EntityType from a Bukkit one.default BukkitPlayerCreate a WorldEdit Player from a Bukkit Player.default GameModeCreate a WorldEdit GameMode from a Bukkit one.default BaseItemStackCreate a WorldEdit BaseItemStack from a Bukkit ItemStackdefault WorldCreate a WorldEdit world from a Bukkit world.default Locationadapt(World world, BlockVector3 position) default LocationCreate a Bukkit location from a WorldEdit position with a Bukkit world.default LocationCreate a Bukkit location from a WorldEdit location with a Bukkit world.default BlockStateasBlockState(ItemStack itemStack) Create a WorldEdit BlockStateHolder from a Bukkit ItemStackdefault BlockTypeasBlockType(Material material) Converts a Material to a BlockTypedefault BlockVector3asBlockVector(Location location) Create a WorldEdit BlockVector from a Bukkit location.default BukkitWorldasBukkitWorld(World world) Convert any WorldEdit world into an equivalent wrapped Bukkit world.default ItemTypeasItemType(Material material) Converts a Material to a ItemTypedefault Vector3Create a WorldEdit Vector from a Bukkit location.default booleanChecks equality between a WorldEdit BlockType and a Bukkit Materialdefault booleangenerateTree(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
RuntimeExceptionwill 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
-