public interface BukkitImplAdapter
Modifier and Type | Method and Description |
---|---|
org.bukkit.inventory.ItemStack |
adapt(com.sk89q.worldedit.blocks.BaseItemStack item)
Create a Bukkit ItemStack with NBT, if available.
|
com.sk89q.worldedit.blocks.BaseItemStack |
adapt(org.bukkit.inventory.ItemStack itemStack)
Create a WorldEdit ItemStack with NBT, if available.
|
boolean |
canPlaceAt(org.bukkit.World world,
com.sk89q.worldedit.math.BlockVector3 position,
com.sk89q.worldedit.world.block.BlockState blockState)
Gets whether the given
BlockState can be placed here. |
org.bukkit.entity.Entity |
createEntity(org.bukkit.Location location,
com.sk89q.worldedit.entity.BaseEntity state)
Create the given entity.
|
com.sk89q.worldedit.internal.wna.WorldNativeAccess<?,?,?> |
createWorldNativeAccess(org.bukkit.World world)
Create a
WorldNativeAccess for the given world reference. |
com.sk89q.worldedit.world.block.BaseBlock |
getBlock(org.bukkit.Location location)
Get the block at the given location.
|
com.sk89q.worldedit.world.DataFixer |
getDataFixer()
Get a data fixer, or null if not supported.
|
com.sk89q.worldedit.entity.BaseEntity |
getEntity(org.bukkit.entity.Entity entity)
Get the state for the given entity.
|
default java.util.OptionalInt |
getInternalBlockStateId(org.bukkit.block.data.BlockData data) |
default java.util.OptionalInt |
getInternalBlockStateId(com.sk89q.worldedit.world.block.BlockState state)
Retrieve the internal ID for a given state, if possible.
|
java.util.Map<java.lang.String,? extends com.sk89q.worldedit.registry.state.Property<?>> |
getProperties(com.sk89q.worldedit.world.block.BlockType blockType)
Get a map of
string -> property . |
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.
|
java.util.Set<com.sk89q.worldedit.util.SideEffect> |
getSupportedSideEffects()
Get the
SideEffect s that this adapter supports. |
default boolean |
regenerate(org.bukkit.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".
|
void |
sendFakeNBT(org.bukkit.entity.Player player,
com.sk89q.worldedit.math.BlockVector3 pos,
com.sk89q.jnbt.CompoundTag nbtData)
Send the given NBT data to the player.
|
void |
sendFakeOP(org.bukkit.entity.Player player)
Make the client think it has operator status.
|
default boolean |
simulateItemUse(org.bukkit.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 |
supportsWatchdog()
Check if this adapter supports the watchdog.
|
default void |
tickWatchdog()
Tick the server watchdog, if possible.
|
@Nullable com.sk89q.worldedit.world.DataFixer getDataFixer()
default boolean supportsWatchdog()
true
if tickWatchdog()
is implementeddefault void tickWatchdog()
com.sk89q.worldedit.world.block.BaseBlock getBlock(org.bukkit.Location location)
location
- the locationcom.sk89q.worldedit.internal.wna.WorldNativeAccess<?,?,?> createWorldNativeAccess(org.bukkit.World world)
WorldNativeAccess
for the given world reference.world
- the world reference@Nullable com.sk89q.worldedit.entity.BaseEntity getEntity(org.bukkit.entity.Entity entity)
entity
- the entity@Nullable org.bukkit.entity.Entity createEntity(org.bukkit.Location location, com.sk89q.worldedit.entity.BaseEntity state)
location
- the locationstate
- the statecom.sk89q.worldedit.util.formatting.text.Component getRichBlockName(com.sk89q.worldedit.world.block.BlockType blockType)
blockType
- the blockcom.sk89q.worldedit.util.formatting.text.Component getRichItemName(com.sk89q.worldedit.world.item.ItemType itemType)
itemType
- the itemcom.sk89q.worldedit.util.formatting.text.Component getRichItemName(com.sk89q.worldedit.blocks.BaseItemStack itemStack)
itemStack
- the item stackjava.util.Map<java.lang.String,? extends com.sk89q.worldedit.registry.state.Property<?>> getProperties(com.sk89q.worldedit.world.block.BlockType blockType)
string -> property
.blockType
- The block typevoid sendFakeNBT(org.bukkit.entity.Player player, com.sk89q.worldedit.math.BlockVector3 pos, com.sk89q.jnbt.CompoundTag nbtData)
player
- The playerpos
- The positionnbtData
- The NBT Datavoid sendFakeOP(org.bukkit.entity.Player player)
player
- The playerdefault boolean simulateItemUse(org.bukkit.World world, com.sk89q.worldedit.math.BlockVector3 position, com.sk89q.worldedit.blocks.BaseItem item, com.sk89q.worldedit.util.Direction face)
world
- the worldposition
- the locationitem
- the item to be usedface
- the direction in which to "face" when using the itemboolean canPlaceAt(org.bukkit.World world, com.sk89q.worldedit.math.BlockVector3 position, com.sk89q.worldedit.world.block.BlockState blockState)
BlockState
can be placed here.world
- The worldposition
- The positionblockState
- The blockstateorg.bukkit.inventory.ItemStack adapt(com.sk89q.worldedit.blocks.BaseItemStack item)
item
- the WorldEdit BaseItemStack to adaptcom.sk89q.worldedit.blocks.BaseItemStack adapt(org.bukkit.inventory.ItemStack itemStack)
itemStack
- the Bukkit ItemStack to adaptjava.util.Set<com.sk89q.worldedit.util.SideEffect> getSupportedSideEffects()
SideEffect
s that this adapter supports.default java.util.OptionalInt getInternalBlockStateId(org.bukkit.block.data.BlockData data)
default java.util.OptionalInt getInternalBlockStateId(com.sk89q.worldedit.world.block.BlockState state)
state
- The block statedefault boolean regenerate(org.bukkit.World world, com.sk89q.worldedit.regions.Region region, com.sk89q.worldedit.extent.Extent extent, com.sk89q.worldedit.world.RegenOptions options)
world
- the world to regen inregion
- the region to regenextent
- the extent to use for setting blocksoptions
- the regeneration options