Interface BukkitImplAdapter<T>
- All Superinterfaces:
IBukkitAdapter
- All Known Subinterfaces:
IDelegateBukkitImplAdapter<T>
An interface for adapters of various Bukkit implementations.
-
Method Summary
Modifier and TypeMethodDescriptionadapt
(com.sk89q.worldedit.blocks.BaseItemStack item) Create a Bukkit ItemStack with NBT, if available.com.sk89q.worldedit.blocks.BaseItemStack
Create a WorldEdit ItemStack with NBT, if available.boolean
canPlaceAt
(World world, com.sk89q.worldedit.math.BlockVector3 position, com.sk89q.worldedit.world.block.BlockState blockState) Gets whether the givenBlockState
can be placed here.default boolean
clearContainerBlockContents
(World world, com.sk89q.worldedit.math.BlockVector3 pt) Clears the contents of a Clearable block.createEntity
(Location location, com.sk89q.worldedit.entity.BaseEntity state) Create the given entity.default World
createWorld
(WorldCreator creator) com.sk89q.worldedit.internal.wna.WorldNativeAccess<?,
?, ?> createWorldNativeAccess
(World world) Create aWorldNativeAccess
for the given world reference.default T
fromNative
(com.sk89q.jnbt.Tag foreign) Deprecated.default T
fromNativeBinary
(com.sk89q.worldedit.util.nbt.BinaryTag foreign) default com.fastasyncworldedit.core.queue.IChunkGet
com.sk89q.worldedit.world.block.BlockState
Get the block at the given location.com.sk89q.worldedit.world.DataFixer
Get a data fixer, or null if not supported.com.sk89q.worldedit.entity.BaseEntity
Get the state for the given entity.com.sk89q.worldedit.world.block.BaseBlock
getFullBlock
(Location location) Get the block at the given location.default int
getInternalBiomeId
(com.sk89q.worldedit.world.biome.BiomeType biome) default OptionalInt
getInternalBlockStateId
(com.sk89q.worldedit.world.block.BlockState state) Retrieve the internal ID for a given state, if possible.default OptionalInt
default com.sk89q.worldedit.world.registry.BlockMaterial
getMaterial
(com.sk89q.worldedit.world.block.BlockState blockState) default com.sk89q.worldedit.world.registry.BlockMaterial
getMaterial
(com.sk89q.worldedit.world.block.BlockType blockType) getProperties
(com.sk89q.worldedit.world.block.BlockType blockType) Get a map ofstring -> property
.default Iterable<NamespacedKey>
Returns an iterable of all biomes known to the server.default com.fastasyncworldedit.core.extent.processor.lighting.RelighterFactory
com.sk89q.worldedit.util.formatting.text.Component
getRichBlockName
(com.sk89q.worldedit.world.block.BlockType blockType) Gets the name for the given block.com.sk89q.worldedit.util.formatting.text.Component
getRichItemName
(com.sk89q.worldedit.blocks.BaseItemStack itemStack) Gets the name for the given item stack.com.sk89q.worldedit.util.formatting.text.Component
getRichItemName
(com.sk89q.worldedit.world.item.ItemType itemType) Gets the name for the given item.Set<com.sk89q.worldedit.util.SideEffect>
Get theSideEffect
s that this adapter supports.default com.fastasyncworldedit.core.queue.IBatchProcessor
Returns anIBatchProcessor
instance for post-processing of chunks to sort ticking of placed/existing blocks and fluids if the plugin is configured to do sodefault boolean
regenerate
(World world, com.sk89q.worldedit.regions.Region region, com.sk89q.worldedit.extent.Extent extent, com.sk89q.worldedit.world.RegenOptions options) Regenerate a region in the given world, so it appears "as new".default void
sendFakeChunk
(World world, Player player, com.fastasyncworldedit.core.queue.implementation.packet.ChunkPacket packet) Send a fake chunk packet to a player.void
sendFakeNBT
(Player player, com.sk89q.worldedit.math.BlockVector3 pos, com.sk89q.worldedit.util.nbt.CompoundBinaryTag nbtData) Send the given NBT data to the player.void
sendFakeOP
(Player player) Make the client think it has operator status.default boolean
simulateItemUse
(World world, com.sk89q.worldedit.math.BlockVector3 position, com.sk89q.worldedit.blocks.BaseItem item, com.sk89q.worldedit.util.Direction face) Simulates a player using an item.default boolean
Check if this adapter supports the watchdog.default void
Tick the server watchdog, if possible.default com.sk89q.jnbt.Tag
Deprecated.default com.sk89q.worldedit.util.nbt.BinaryTag
toNativeBinary
(T foreign) Methods inherited from interface com.fastasyncworldedit.bukkit.adapter.IBukkitAdapter
adapt, adapt, adapt, adapt, adapt, adapt, adapt, adapt, adapt, adapt, adapt, adapt, adapt, adapt, adapt, adapt, adapt, asBlockState, asBlockType, asBlockVector, asBukkitWorld, asItemType, asVector, equals, generateTree, getEntities
-
Method Details
-
getDataFixer
@Nullable com.sk89q.worldedit.world.DataFixer getDataFixer()Get a data fixer, or null if not supported.- Returns:
- the data fixer
-
supportsWatchdog
default boolean supportsWatchdog()Check if this adapter supports the watchdog.- Returns:
true
iftickWatchdog()
is implemented
-
tickWatchdog
default void tickWatchdog()Tick the server watchdog, if possible. -
getBlock
Get the block at the given location.- Parameters:
location
- the location- Returns:
- the block
-
getFullBlock
Get the block at the given location.- Parameters:
location
- the location- Returns:
- the block
-
createWorldNativeAccess
Create aWorldNativeAccess
for the given world reference.- Parameters:
world
- the world reference- Returns:
- the native access object
-
getEntity
Get the state for the given entity.- Parameters:
entity
- the entity- Returns:
- the state, or null
-
createEntity
Create the given entity.- Parameters:
location
- the locationstate
- the state- Returns:
- the created entity or null
-
getRichBlockName
com.sk89q.worldedit.util.formatting.text.Component getRichBlockName(com.sk89q.worldedit.world.block.BlockType blockType) Gets the name for the given block.- Parameters:
blockType
- the block- Returns:
- The name
-
getRichItemName
com.sk89q.worldedit.util.formatting.text.Component getRichItemName(com.sk89q.worldedit.world.item.ItemType itemType) Gets the name for the given item.- Parameters:
itemType
- the item- Returns:
- The name
-
getRichItemName
com.sk89q.worldedit.util.formatting.text.Component getRichItemName(com.sk89q.worldedit.blocks.BaseItemStack itemStack) Gets the name for the given item stack.- Parameters:
itemStack
- the item stack- Returns:
- The name
-
getProperties
Map<String,? extends com.sk89q.worldedit.registry.state.Property<?>> getProperties(com.sk89q.worldedit.world.block.BlockType blockType) Get a map ofstring -> property
.- Parameters:
blockType
- The block type- Returns:
- The properties map
-
sendFakeNBT
void sendFakeNBT(Player player, com.sk89q.worldedit.math.BlockVector3 pos, com.sk89q.worldedit.util.nbt.CompoundBinaryTag nbtData) Send the given NBT data to the player.- Parameters:
player
- The playerpos
- The positionnbtData
- The NBT Data
-
sendFakeOP
Make the client think it has operator status. This does not give them any operator capabilities.- Parameters:
player
- The player
-
simulateItemUse
default boolean simulateItemUse(World world, com.sk89q.worldedit.math.BlockVector3 position, com.sk89q.worldedit.blocks.BaseItem item, com.sk89q.worldedit.util.Direction face) Simulates a player using an item.- Parameters:
world
- the worldposition
- the locationitem
- the item to be usedface
- the direction in which to "face" when using the item- Returns:
- whether the usage was successful
-
canPlaceAt
boolean canPlaceAt(World world, com.sk89q.worldedit.math.BlockVector3 position, com.sk89q.worldedit.world.block.BlockState blockState) Gets whether the givenBlockState
can be placed here.- Parameters:
world
- The worldposition
- The positionblockState
- The blockstate- Returns:
- If it can be placed
-
adapt
Create a Bukkit ItemStack with NBT, if available.- Specified by:
adapt
in interfaceIBukkitAdapter
- Parameters:
item
- the WorldEdit BaseItemStack to adapt- Returns:
- the Bukkit ItemStack
-
adapt
Create a WorldEdit ItemStack with NBT, if available.- Specified by:
adapt
in interfaceIBukkitAdapter
- Parameters:
itemStack
- the Bukkit ItemStack to adapt- Returns:
- the WorldEdit BaseItemStack
-
getSupportedSideEffects
Set<com.sk89q.worldedit.util.SideEffect> getSupportedSideEffects()Get theSideEffect
s that this adapter supports.- Returns:
- The side effects that are supported
-
getInternalBlockStateId
-
getInternalBlockStateId
Retrieve the internal ID for a given state, if possible.- Parameters:
state
- The block state- Returns:
- the internal ID of the state
-
regenerate
default boolean regenerate(World world, com.sk89q.worldedit.regions.Region region, com.sk89q.worldedit.extent.Extent extent, com.sk89q.worldedit.world.RegenOptions options) throws Exception Regenerate a region in the given world, so it appears "as new".- Parameters:
world
- the world to regen inregion
- the region to regenextent
- the extent to use for setting blocksoptions
- the regeneration options- Returns:
- true on success, false on failure
- Throws:
Exception
-
clearContainerBlockContents
Clears the contents of a Clearable block.- Parameters:
world
- The worldpt
- The location- Returns:
- If a block was cleared
-
getMaterial
default com.sk89q.worldedit.world.registry.BlockMaterial getMaterial(com.sk89q.worldedit.world.block.BlockType blockType) -
getMaterial
default com.sk89q.worldedit.world.registry.BlockMaterial getMaterial(com.sk89q.worldedit.world.block.BlockState blockState) -
toNative
Deprecated. -
toNativeBinary
-
fromNative
Deprecated. -
fromNativeBinary
-
createWorld
-
sendFakeChunk
default void sendFakeChunk(World world, Player player, com.fastasyncworldedit.core.queue.implementation.packet.ChunkPacket packet) Send a fake chunk packet to a player. -
get
-
getInternalBiomeId
default int getInternalBiomeId(com.sk89q.worldedit.world.biome.BiomeType biome) -
getRegisteredBiomes
Returns an iterable of all biomes known to the server.- Returns:
- all biomes known to the server.
-
getRelighterFactory
default com.fastasyncworldedit.core.extent.processor.lighting.RelighterFactory getRelighterFactory() -
getAllProperties
-
getTickingPostProcessor
default com.fastasyncworldedit.core.queue.IBatchProcessor getTickingPostProcessor()Returns anIBatchProcessor
instance for post-processing of chunks to sort ticking of placed/existing blocks and fluids if the plugin is configured to do so- Since:
- 2.1.0
-