Enum Class BukkitAdapter

java.lang.Object
java.lang.Enum<BukkitAdapter>
com.sk89q.worldedit.bukkit.BukkitAdapter
All Implemented Interfaces:
Serializable, Comparable<BukkitAdapter>, Constable

public enum BukkitAdapter extends Enum<BukkitAdapter>
Adapts between Bukkit and WorldEdit equivalent objects.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static ItemStack
    adapt(com.sk89q.worldedit.blocks.BaseItemStack item)
    Create a Bukkit ItemStack from a WorldEdit BaseItemStack.
    static Player
    adapt(com.sk89q.worldedit.entity.Player player)
    Create a Bukkit Player from a WorldEdit Player.
    adapt(com.sk89q.worldedit.extension.platform.Actor actor)
    Create a Bukkit CommandSender from a WorldEdit Actor.
    static Location
    adapt(com.sk89q.worldedit.util.Location location)
    Create a Bukkit location from a WorldEdit location.
    static Biome
    adapt(com.sk89q.worldedit.world.biome.BiomeType biomeType)
     
    static BlockData
    adapt(com.sk89q.worldedit.world.block.BlockStateHolder block)
    Create a Bukkit BlockData from a WorldEdit BlockStateHolder.
    static Material
    adapt(com.sk89q.worldedit.world.block.BlockType blockType)
    Create a Bukkit Material form a WorldEdit BlockType.
    static EntityType
    adapt(com.sk89q.worldedit.world.entity.EntityType entityType)
     
    static Material
    adapt(com.sk89q.worldedit.world.item.ItemType itemType)
    Create a Bukkit Material form a WorldEdit ItemType.
    static World
    adapt(com.sk89q.worldedit.world.World world)
    Create a Bukkit world from a WorldEdit world.
    static com.sk89q.worldedit.world.biome.BiomeType
    adapt(Biome biome)
    Create a WorldEdit BiomeType from a Bukkit one.
    static com.sk89q.worldedit.util.Direction
    Create a WorldEdit Direction from a Bukkit BlockFace.
    static com.sk89q.worldedit.world.block.BlockState
    adapt(BlockData blockData)
    Create a WorldEdit BlockState from a Bukkit BlockData.
    static com.sk89q.worldedit.extension.platform.Actor
    Create a WorldEdit Actor from a Bukkit CommandSender.
    static com.sk89q.worldedit.entity.Entity
    adapt(Entity entity)
    Create a WorldEdit entity from a Bukkit entity.
    static com.sk89q.worldedit.world.entity.EntityType
    adapt(EntityType entityType)
    Create a WorldEdit EntityType from a Bukkit one.
    adapt(Player player)
    Create a WorldEdit Player from a Bukkit Player.
    static com.sk89q.worldedit.world.gamemode.GameMode
    adapt(GameMode gameMode)
    Create a WorldEdit GameMode from a Bukkit one.
    static com.sk89q.worldedit.blocks.BaseItemStack
    adapt(ItemStack itemStack)
    Create a WorldEdit BaseItemStack from a Bukkit ItemStack.
    static com.sk89q.worldedit.util.Location
    adapt(Location location)
    Create a WorldEdit location from a Bukkit location.
    static com.sk89q.worldedit.world.World
    adapt(World world)
    Create a WorldEdit world from a Bukkit world.
    static Location
    adapt(World world, com.sk89q.worldedit.math.BlockVector3 position)
    Create a Bukkit location from a WorldEdit position with a Bukkit world.
    static Location
    adapt(World world, com.sk89q.worldedit.math.Vector3 position)
    Create a Bukkit location from a WorldEdit position with a Bukkit world.
    static Location
    adapt(World world, com.sk89q.worldedit.util.Location location)
    Create a Bukkit location from a WorldEdit location with a Bukkit world.
    static com.sk89q.worldedit.world.block.BlockState
    Create a WorldEdit BlockState from a Bukkit ItemStack.
    static com.sk89q.worldedit.world.block.BlockType
    Converts a Material to a BlockType.
    static com.sk89q.worldedit.math.BlockVector3
    Create a WorldEdit BlockVector from a Bukkit location.
    asBukkitWorld(com.sk89q.worldedit.world.World world)
    Convert any WorldEdit world into an equivalent wrapped Bukkit world.
    static com.sk89q.worldedit.world.item.ItemType
    asItemType(Material material)
    Converts a Material to a ItemType.
    static com.sk89q.worldedit.math.Vector3
    asVector(Location location)
    Create a WorldEdit Vector from a Bukkit location.
    static boolean
    equals(com.sk89q.worldedit.world.block.BlockType blockType, Material type)
    Checks equality between a WorldEdit BlockType and a Bukkit Material.
    Returns the enum constant of this class with the specified name.
    static BukkitAdapter[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

  • Method Details

    • values

      public static BukkitAdapter[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static BukkitAdapter valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • equals

      public static boolean equals(com.sk89q.worldedit.world.block.BlockType blockType, Material type)
      Checks equality between a WorldEdit BlockType and a Bukkit Material.
      Parameters:
      blockType - The WorldEdit BlockType
      type - The Bukkit Material
      Returns:
      If they are equal
    • asBukkitWorld

      public static BukkitWorld asBukkitWorld(com.sk89q.worldedit.world.World world)
      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

      public static com.sk89q.worldedit.world.World adapt(World world)
      Create a WorldEdit world from a Bukkit world.
      Parameters:
      world - the Bukkit world
      Returns:
      a WorldEdit world
    • adapt

      public static com.sk89q.worldedit.extension.platform.Actor adapt(CommandSender sender)
      Create a WorldEdit Actor from a Bukkit CommandSender.
      Parameters:
      sender - The Bukkit CommandSender
      Returns:
      The WorldEdit Actor
    • adapt

      public static BukkitPlayer adapt(Player player)
      Create a WorldEdit Player from a Bukkit Player.
      Parameters:
      player - The Bukkit player
      Returns:
      The WorldEdit player
    • adapt

      public static CommandSender adapt(com.sk89q.worldedit.extension.platform.Actor actor)
      Create a Bukkit CommandSender from a WorldEdit Actor.
      Parameters:
      actor - The WorldEdit actor
      Returns:
      The Bukkit command sender
    • adapt

      public static Player adapt(com.sk89q.worldedit.entity.Player player)
      Create a Bukkit Player from a WorldEdit Player.
      Parameters:
      player - The WorldEdit player
      Returns:
      The Bukkit player
    • adapt

      public static com.sk89q.worldedit.util.Direction adapt(@Nullable BlockFace face)
      Create a WorldEdit Direction from a Bukkit BlockFace.
      Parameters:
      face - the Bukkit BlockFace
      Returns:
      a WorldEdit direction
    • adapt

      public static World adapt(com.sk89q.worldedit.world.World world)
      Create a Bukkit world from a WorldEdit world.
      Parameters:
      world - the WorldEdit world
      Returns:
      a Bukkit world
    • adapt

      public static com.sk89q.worldedit.util.Location adapt(Location location)
      Create a WorldEdit location from a Bukkit location.
      Parameters:
      location - the Bukkit location
      Returns:
      a WorldEdit location
    • adapt

      public static Location adapt(com.sk89q.worldedit.util.Location location)
      Create a Bukkit location from a WorldEdit location.
      Parameters:
      location - the WorldEdit location
      Returns:
      a Bukkit location
    • adapt

      public static Location adapt(World world, com.sk89q.worldedit.math.Vector3 position)
      Create a Bukkit location from a WorldEdit position with a Bukkit world.
      Parameters:
      world - the Bukkit world
      position - the WorldEdit position
      Returns:
      a Bukkit location
    • adapt

      public static Location adapt(World world, com.sk89q.worldedit.math.BlockVector3 position)
      Create a Bukkit location from a WorldEdit position with a Bukkit world.
      Parameters:
      world - the Bukkit world
      position - the WorldEdit position
      Returns:
      a Bukkit location
    • adapt

      public static Location adapt(World world, com.sk89q.worldedit.util.Location location)
      Create a Bukkit location from a WorldEdit location with a Bukkit world.
      Parameters:
      world - the Bukkit world
      location - the WorldEdit location
      Returns:
      a Bukkit location
    • asVector

      public static com.sk89q.worldedit.math.Vector3 asVector(Location location)
      Create a WorldEdit Vector from a Bukkit location.
      Parameters:
      location - The Bukkit location
      Returns:
      a WorldEdit vector
    • asBlockVector

      public static com.sk89q.worldedit.math.BlockVector3 asBlockVector(Location location)
      Create a WorldEdit BlockVector from a Bukkit location.
      Parameters:
      location - The Bukkit location
      Returns:
      a WorldEdit vector
    • adapt

      public static com.sk89q.worldedit.entity.Entity adapt(Entity entity)
      Create a WorldEdit entity from a Bukkit entity.
      Parameters:
      entity - the Bukkit entity
      Returns:
      a WorldEdit entity
    • adapt

      public static Material adapt(com.sk89q.worldedit.world.item.ItemType itemType)
      Create a Bukkit Material form a WorldEdit ItemType.
      Parameters:
      itemType - The WorldEdit ItemType
      Returns:
      The Bukkit Material
    • adapt

      public static Material adapt(com.sk89q.worldedit.world.block.BlockType blockType)
      Create a Bukkit Material form a WorldEdit BlockType.
      Parameters:
      blockType - The WorldEdit BlockType
      Returns:
      The Bukkit Material
    • adapt

      public static com.sk89q.worldedit.world.gamemode.GameMode adapt(GameMode gameMode)
      Create a WorldEdit GameMode from a Bukkit one.
      Parameters:
      gameMode - Bukkit GameMode
      Returns:
      WorldEdit GameMode
    • adapt

      public static com.sk89q.worldedit.world.biome.BiomeType adapt(Biome biome)
      Create a WorldEdit BiomeType from a Bukkit one.
      Parameters:
      biome - Bukkit Biome
      Returns:
      WorldEdit BiomeType
    • adapt

      public static Biome adapt(com.sk89q.worldedit.world.biome.BiomeType biomeType)
    • adapt

      public static com.sk89q.worldedit.world.entity.EntityType adapt(EntityType entityType)
      Create a WorldEdit EntityType from a Bukkit one.
      Parameters:
      entityType - Bukkit EntityType
      Returns:
      WorldEdit EntityType
    • adapt

      public static EntityType adapt(com.sk89q.worldedit.world.entity.EntityType entityType)
    • asBlockType

      @Nullable public static com.sk89q.worldedit.world.block.BlockType asBlockType(Material material)
      Converts a Material to a BlockType.
      Parameters:
      material - The material
      Returns:
      The blocktype
    • asItemType

      @Nullable public static com.sk89q.worldedit.world.item.ItemType asItemType(Material material)
      Converts a Material to a ItemType.
      Parameters:
      material - The material
      Returns:
      The itemtype
    • adapt

      public static com.sk89q.worldedit.world.block.BlockState adapt(@Nonnull BlockData blockData)
      Create a WorldEdit BlockState from a Bukkit BlockData.
      Parameters:
      blockData - The Bukkit BlockData
      Returns:
      The WorldEdit BlockState
    • adapt

      public static BlockData adapt(@Nonnull com.sk89q.worldedit.world.block.BlockStateHolder block)
      Create a Bukkit BlockData from a WorldEdit BlockStateHolder.
      Parameters:
      block - The WorldEdit BlockStateHolder
      Returns:
      The Bukkit BlockData
    • asBlockState

      public static com.sk89q.worldedit.world.block.BlockState asBlockState(ItemStack itemStack) throws com.sk89q.worldedit.WorldEditException
      Create a WorldEdit BlockState from a Bukkit ItemStack.
      Parameters:
      itemStack - The Bukkit ItemStack
      Returns:
      The WorldEdit BlockState
      Throws:
      com.sk89q.worldedit.WorldEditException
    • adapt

      public static com.sk89q.worldedit.blocks.BaseItemStack adapt(ItemStack itemStack)
      Create a WorldEdit BaseItemStack from a Bukkit ItemStack.
      Parameters:
      itemStack - The Bukkit ItemStack
      Returns:
      The WorldEdit BaseItemStack
    • adapt

      public static ItemStack adapt(com.sk89q.worldedit.blocks.BaseItemStack item)
      Create a Bukkit ItemStack from a WorldEdit BaseItemStack.
      Parameters:
      item - The WorldEdit BaseItemStack
      Returns:
      The Bukkit ItemStack