Interface IDelegateBukkitImplAdapter<T>

All Superinterfaces:
BukkitImplAdapter<T>, IBukkitAdapter

public interface IDelegateBukkitImplAdapter<T> extends BukkitImplAdapter<T>
  • 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 with NBT, if available.
    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 ItemStack with NBT, if available.
    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 Entity
    createEntity(Location location, com.sk89q.worldedit.entity.BaseEntity state)
    Create the given entity.
    default World
     
    default boolean
    equals(com.sk89q.worldedit.world.block.BlockType blockType, Material type)
    Checks equality between a WorldEdit BlockType and a Bukkit Material
    default T
    fromNative(com.sk89q.jnbt.Tag foreign)
     
    default T
    fromNativeBinary(com.sk89q.worldedit.util.nbt.BinaryTag foreign)
     
    default com.sk89q.worldedit.world.block.BlockState
    getBlock(Location location)
    Get the block at the given location.
    default com.sk89q.worldedit.world.DataFixer
    Get a data fixer, or null if not supported.
    default com.sk89q.worldedit.entity.BaseEntity
    getEntity(Entity entity)
    Get the state for the given entity.
    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)
     
     
    default Map<String,? extends com.sk89q.worldedit.registry.state.Property<?>>
    getProperties(com.sk89q.worldedit.world.block.BlockType blockType)
    Get a map of string -> property.
    default void
    sendFakeChunk(World world, Player player, com.fastasyncworldedit.core.queue.implementation.packet.ChunkPacket packet)
    Send a fake chunk packet to a player.
    default 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.
    default void
    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
    toNative(T foreign)
     
    default com.sk89q.worldedit.util.nbt.BinaryTag
    toNativeBinary(T foreign)
     

    Methods inherited from interface com.fastasyncworldedit.bukkit.adapter.IBukkitAdapter

    generateTree, getEntities
  • Method Details

    • getParent

      BukkitImplAdapter<T> getParent()
    • getDataFixer

      @Nullable default com.sk89q.worldedit.world.DataFixer getDataFixer()
      Description copied from interface: BukkitImplAdapter
      Get a data fixer, or null if not supported.
      Specified by:
      getDataFixer in interface BukkitImplAdapter<T>
      Returns:
      the data fixer
    • supportsWatchdog

      default boolean supportsWatchdog()
      Description copied from interface: BukkitImplAdapter
      Check if this adapter supports the watchdog.
      Specified by:
      supportsWatchdog in interface BukkitImplAdapter<T>
      Returns:
      true if BukkitImplAdapter.tickWatchdog() is implemented
    • tickWatchdog

      default void tickWatchdog()
      Description copied from interface: BukkitImplAdapter
      Tick the server watchdog, if possible.
      Specified by:
      tickWatchdog in interface BukkitImplAdapter<T>
    • getBlock

      default com.sk89q.worldedit.world.block.BlockState getBlock(Location location)
      Description copied from interface: BukkitImplAdapter
      Get the block at the given location.
      Specified by:
      getBlock in interface BukkitImplAdapter<T>
      Parameters:
      location - the location
      Returns:
      the block
    • getEntity

      @Nullable default com.sk89q.worldedit.entity.BaseEntity getEntity(Entity entity)
      Description copied from interface: BukkitImplAdapter
      Get the state for the given entity.
      Specified by:
      getEntity in interface BukkitImplAdapter<T>
      Parameters:
      entity - the entity
      Returns:
      the state, or null
    • createEntity

      @Nullable default Entity createEntity(Location location, com.sk89q.worldedit.entity.BaseEntity state)
      Description copied from interface: BukkitImplAdapter
      Create the given entity.
      Specified by:
      createEntity in interface BukkitImplAdapter<T>
      Parameters:
      location - the location
      state - the state
      Returns:
      the created entity or null
    • getProperties

      default Map<String,? extends com.sk89q.worldedit.registry.state.Property<?>> getProperties(com.sk89q.worldedit.world.block.BlockType blockType)
      Description copied from interface: BukkitImplAdapter
      Get a map of string -> property.
      Specified by:
      getProperties in interface BukkitImplAdapter<T>
      Parameters:
      blockType - The block type
      Returns:
      The properties map
    • sendFakeNBT

      default void sendFakeNBT(Player player, com.sk89q.worldedit.math.BlockVector3 pos, com.sk89q.worldedit.util.nbt.CompoundBinaryTag nbtData)
      Description copied from interface: BukkitImplAdapter
      Send the given NBT data to the player.
      Specified by:
      sendFakeNBT in interface BukkitImplAdapter<T>
      Parameters:
      player - The player
      pos - The position
      nbtData - The NBT Data
    • sendFakeOP

      default void sendFakeOP(Player player)
      Description copied from interface: BukkitImplAdapter
      Make the client think it has operator status. This does not give them any operator capabilities.
      Specified by:
      sendFakeOP in interface BukkitImplAdapter<T>
      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)
      Description copied from interface: BukkitImplAdapter
      Simulates a player using an item.
      Specified by:
      simulateItemUse in interface BukkitImplAdapter<T>
      Parameters:
      world - the world
      position - the location
      item - the item to be used
      face - the direction in which to "face" when using the item
      Returns:
      whether the usage was successful
    • adapt

      default ItemStack adapt(com.sk89q.worldedit.blocks.BaseItemStack item)
      Description copied from interface: BukkitImplAdapter
      Create a Bukkit ItemStack with NBT, if available.
      Specified by:
      adapt in interface BukkitImplAdapter<T>
      Specified by:
      adapt in interface IBukkitAdapter
      Parameters:
      item - the WorldEdit BaseItemStack to adapt
      Returns:
      the Bukkit ItemStack
    • adapt

      default com.sk89q.worldedit.blocks.BaseItemStack adapt(ItemStack itemStack)
      Description copied from interface: BukkitImplAdapter
      Create a WorldEdit ItemStack with NBT, if available.
      Specified by:
      adapt in interface BukkitImplAdapter<T>
      Specified by:
      adapt in interface IBukkitAdapter
      Parameters:
      itemStack - the Bukkit ItemStack to adapt
      Returns:
      the WorldEdit BaseItemStack
    • getInternalBlockStateId

      default OptionalInt getInternalBlockStateId(BlockData data)
      Specified by:
      getInternalBlockStateId in interface BukkitImplAdapter<T>
    • getInternalBlockStateId

      default OptionalInt getInternalBlockStateId(com.sk89q.worldedit.world.block.BlockState state)
      Description copied from interface: BukkitImplAdapter
      Retrieve the internal ID for a given state, if possible.
      Specified by:
      getInternalBlockStateId in interface BukkitImplAdapter<T>
      Parameters:
      state - The block state
      Returns:
      the internal ID of the state
    • getMaterial

      default com.sk89q.worldedit.world.registry.BlockMaterial getMaterial(com.sk89q.worldedit.world.block.BlockType blockType)
      Specified by:
      getMaterial in interface BukkitImplAdapter<T>
    • getMaterial

      default com.sk89q.worldedit.world.registry.BlockMaterial getMaterial(com.sk89q.worldedit.world.block.BlockState blockState)
      Specified by:
      getMaterial in interface BukkitImplAdapter<T>
    • toNative

      default com.sk89q.jnbt.Tag toNative(T foreign)
      Specified by:
      toNative in interface BukkitImplAdapter<T>
    • toNativeBinary

      default com.sk89q.worldedit.util.nbt.BinaryTag toNativeBinary(T foreign)
      Specified by:
      toNativeBinary in interface BukkitImplAdapter<T>
    • fromNative

      default T fromNative(com.sk89q.jnbt.Tag foreign)
      Specified by:
      fromNative in interface BukkitImplAdapter<T>
    • fromNativeBinary

      default T fromNativeBinary(com.sk89q.worldedit.util.nbt.BinaryTag foreign)
      Specified by:
      fromNativeBinary in interface BukkitImplAdapter<T>
    • createWorld

      @Nullable default World createWorld(WorldCreator creator)
      Specified by:
      createWorld in interface BukkitImplAdapter<T>
    • sendFakeChunk

      default void sendFakeChunk(World world, Player player, com.fastasyncworldedit.core.queue.implementation.packet.ChunkPacket packet)
      Description copied from interface: BukkitImplAdapter
      Send a fake chunk packet to a player.
      Specified by:
      sendFakeChunk in interface BukkitImplAdapter<T>
    • asBukkitWorld

      default BukkitWorld asBukkitWorld(com.sk89q.worldedit.world.World world)
      Description copied from interface: IBukkitAdapter
      Convert any WorldEdit world into an equivalent wrapped Bukkit world.

      If a matching world cannot be found, a RuntimeException will be thrown.

      Specified by:
      asBukkitWorld in interface IBukkitAdapter
      Parameters:
      world - the world
      Returns:
      a wrapped Bukkit world
    • adapt

      default World adapt(com.sk89q.worldedit.world.World world)
      Description copied from interface: IBukkitAdapter
      Create a Bukkit world from a WorldEdit world.
      Specified by:
      adapt in interface IBukkitAdapter
      Parameters:
      world - the WorldEdit world
      Returns:
      a Bukkit world
    • adapt

      default Location adapt(World world, com.sk89q.worldedit.math.Vector3 position)
      Description copied from interface: IBukkitAdapter
      Create a Bukkit location from a WorldEdit position with a Bukkit world.
      Specified by:
      adapt in interface IBukkitAdapter
      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)
      Specified by:
      adapt in interface IBukkitAdapter
    • adapt

      default Location adapt(World world, com.sk89q.worldedit.util.Location location)
      Description copied from interface: IBukkitAdapter
      Create a Bukkit location from a WorldEdit location with a Bukkit world.
      Specified by:
      adapt in interface IBukkitAdapter
      Parameters:
      world - the Bukkit world
      location - the WorldEdit location
      Returns:
      a Bukkit location
    • asVector

      default com.sk89q.worldedit.math.Vector3 asVector(Location location)
      Description copied from interface: IBukkitAdapter
      Create a WorldEdit Vector from a Bukkit location.
      Specified by:
      asVector in interface IBukkitAdapter
      Parameters:
      location - The Bukkit location
      Returns:
      a WorldEdit vector
    • asBlockVector

      default com.sk89q.worldedit.math.BlockVector3 asBlockVector(Location location)
      Description copied from interface: IBukkitAdapter
      Create a WorldEdit BlockVector from a Bukkit location.
      Specified by:
      asBlockVector in interface IBukkitAdapter
      Parameters:
      location - The Bukkit location
      Returns:
      a WorldEdit vector
    • adapt

      default com.sk89q.worldedit.entity.Entity adapt(Entity entity)
      Description copied from interface: IBukkitAdapter
      Create a WorldEdit entity from a Bukkit entity.
      Specified by:
      adapt in interface IBukkitAdapter
      Parameters:
      entity - the Bukkit entity
      Returns:
      a WorldEdit entity
    • adapt

      default Material adapt(com.sk89q.worldedit.world.item.ItemType itemType)
      Description copied from interface: IBukkitAdapter
      Create a Bukkit Material form a WorldEdit ItemType
      Specified by:
      adapt in interface IBukkitAdapter
      Parameters:
      itemType - The WorldEdit ItemType
      Returns:
      The Bukkit Material
    • adapt

      default Material adapt(com.sk89q.worldedit.world.block.BlockType blockType)
      Description copied from interface: IBukkitAdapter
      Create a Bukkit Material form a WorldEdit BlockType
      Specified by:
      adapt in interface IBukkitAdapter
      Parameters:
      blockType - The WorldEdit BlockType
      Returns:
      The Bukkit Material
    • adapt

      default EntityType adapt(com.sk89q.worldedit.world.entity.EntityType entityType)
      Specified by:
      adapt in interface IBukkitAdapter
    • asBlockType

      default com.sk89q.worldedit.world.block.BlockType asBlockType(Material material)
      Description copied from interface: IBukkitAdapter
      Converts a Material to a BlockType
      Specified by:
      asBlockType in interface IBukkitAdapter
      Parameters:
      material - The material
      Returns:
      The blocktype
    • asItemType

      default com.sk89q.worldedit.world.item.ItemType asItemType(Material material)
      Description copied from interface: IBukkitAdapter
      Converts a Material to a ItemType
      Specified by:
      asItemType in interface IBukkitAdapter
      Parameters:
      material - The material
      Returns:
      The itemtype
    • adapt

      default com.sk89q.worldedit.world.block.BlockState adapt(BlockData blockData)
      Description copied from interface: IBukkitAdapter
      Create a WorldEdit BlockStateHolder from a Bukkit BlockData
      Specified by:
      adapt in interface IBukkitAdapter
      Parameters:
      blockData - The Bukkit BlockData
      Returns:
      The WorldEdit BlockState
    • adapt

      default <B extends com.sk89q.worldedit.world.block.BlockStateHolder<B>> BlockData adapt(B block)
      Description copied from interface: IBukkitAdapter
      Create a Bukkit BlockData from a WorldEdit BlockStateHolder
      Specified by:
      adapt in interface IBukkitAdapter
      Parameters:
      block - The WorldEdit BlockStateHolder
      Returns:
      The Bukkit BlockData
    • adapt

      default BukkitPlayer adapt(Player player)
      Description copied from interface: IBukkitAdapter
      Create a WorldEdit Player from a Bukkit Player.
      Specified by:
      adapt in interface IBukkitAdapter
      Parameters:
      player - The Bukkit player
      Returns:
      The WorldEdit player
    • adapt

      default Player adapt(com.sk89q.worldedit.entity.Player player)
      Description copied from interface: IBukkitAdapter
      Create a Bukkit Player from a WorldEdit Player.
      Specified by:
      adapt in interface IBukkitAdapter
      Parameters:
      player - The WorldEdit player
      Returns:
      The Bukkit player
    • adapt

      default Biome adapt(com.sk89q.worldedit.world.biome.BiomeType biomeType)
      Specified by:
      adapt in interface IBukkitAdapter
    • adapt

      default com.sk89q.worldedit.world.biome.BiomeType adapt(Biome biome)
      Specified by:
      adapt in interface IBukkitAdapter
    • equals

      default boolean equals(com.sk89q.worldedit.world.block.BlockType blockType, Material type)
      Description copied from interface: IBukkitAdapter
      Checks equality between a WorldEdit BlockType and a Bukkit Material
      Specified by:
      equals in interface IBukkitAdapter
      Parameters:
      blockType - The WorldEdit BlockType
      type - The Bukkit Material
      Returns:
      If they are equal
    • adapt

      default com.sk89q.worldedit.world.World adapt(World world)
      Description copied from interface: IBukkitAdapter
      Create a WorldEdit world from a Bukkit world.
      Specified by:
      adapt in interface IBukkitAdapter
      Parameters:
      world - the Bukkit world
      Returns:
      a WorldEdit world
    • adapt

      default com.sk89q.worldedit.world.gamemode.GameMode adapt(GameMode gameMode)
      Description copied from interface: IBukkitAdapter
      Create a WorldEdit GameMode from a Bukkit one.
      Specified by:
      adapt in interface IBukkitAdapter
      Parameters:
      gameMode - Bukkit GameMode
      Returns:
      WorldEdit GameMode
    • adapt

      default com.sk89q.worldedit.world.entity.EntityType adapt(EntityType entityType)
      Description copied from interface: IBukkitAdapter
      Create a WorldEdit EntityType from a Bukkit one.
      Specified by:
      adapt in interface IBukkitAdapter
      Parameters:
      entityType - Bukkit EntityType
      Returns:
      WorldEdit EntityType
    • asBlockState

      default com.sk89q.worldedit.world.block.BlockState asBlockState(ItemStack itemStack)
      Description copied from interface: IBukkitAdapter
      Create a WorldEdit BlockStateHolder from a Bukkit ItemStack
      Specified by:
      asBlockState in interface IBukkitAdapter
      Parameters:
      itemStack - The Bukkit ItemStack
      Returns:
      The WorldEdit BlockState