Class VersionSupport

java.lang.Object
com.andrei1058.bedwars.api.server.VersionSupport

public abstract class VersionSupport extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static String
     
    static String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    VersionSupport(org.bukkit.plugin.Plugin plugin, String versionName)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract org.bukkit.inventory.ItemStack
    addCustomData(org.bukkit.inventory.ItemStack i, String data)
    Add custom data to an ItemStack
    abstract void
    clearArrowsFromPlayerBody(org.bukkit.entity.Player player)
     
    abstract void
    Color a bed 1.12+
    abstract org.bukkit.inventory.ItemStack
    colourItem(org.bukkit.inventory.ItemStack itemStack, ITeam bedWarsTeam)
    Color an item if possible with the team's color
    abstract org.bukkit.inventory.ItemStack
    createItemStack(String material, int amount, short data)
     
    org.bukkit.Effect
    Egg bridge particles
    byte
    getCompressedAngle(float value)
     
    abstract String
    getCustomData(org.bukkit.inventory.ItemStack i)
    Get the NBTTag from a BedWars1058 item
    abstract double
    getDamage(org.bukkit.inventory.ItemStack i)
    Get item-stack damage amount
    Get list of entities that are going to despawn based on a timer.
    abstract String
    getInventoryName(org.bukkit.event.inventory.InventoryEvent e)
    Get inventory name.
    abstract org.bukkit.inventory.ItemStack
    getItemInHand(org.bukkit.entity.Player p)
    Get in had item-stack
    abstract String
    Get main level name.
    static String
     
    abstract org.bukkit.inventory.ItemStack
    getPlayerHead(org.bukkit.entity.Player player, @Nullable org.bukkit.inventory.ItemStack copyTagFrom)
    Get player head with skin.
    org.bukkit.plugin.Plugin
     
    abstract String
    getShopUpgradeIdentifier(org.bukkit.inventory.ItemStack itemStack)
    Get an ItemStack identifier will return null text if it does not have an identifier
    abstract String
    getTag(org.bukkit.inventory.ItemStack itemStack, String key)
    Get a custom item tag.
    abstract int
     
    abstract void
    hideArmor(org.bukkit.entity.Player victim, org.bukkit.entity.Player receiver)
    Hide player armor to a player
    abstract void
    hideEntity(org.bukkit.entity.Entity e, org.bukkit.entity.Player p)
    Hide an entity
    abstract boolean
    isArmor(org.bukkit.inventory.ItemStack itemStack)
    Check if item-stack is armor
    abstract boolean
    isAxe(org.bukkit.inventory.ItemStack itemStack)
    Check if item-stack is axe
    boolean
    isBed(org.bukkit.Material material)
    Check if bed
    abstract boolean
    isBow(org.bukkit.inventory.ItemStack itemStack)
    Check if item-stack is bow
    abstract boolean
    Check if bukkit command is registered
    abstract boolean
    isCustomBedWarsItem(org.bukkit.inventory.ItemStack i)
    Check if an item has a BedWars1058 NBTTag
    boolean
    isDespawnable(org.bukkit.entity.Entity e)
    Is despawnable entity
    boolean
    isGlass(org.bukkit.Material type)
    Check if type is a Glass type material
    abstract boolean
    isInvisibilityPotion(org.bukkit.inventory.ItemStack itemStack)
    Check if itemstack is Invisibility Potion
    boolean
    isPlayerHead(String material, int data)
    Check if is a player head
    abstract boolean
    isProjectile(org.bukkit.inventory.ItemStack itemStack)
    Check if itemstack is Projectile
    abstract boolean
    isSword(org.bukkit.inventory.ItemStack itemStack)
    Check if item-stack is sword
    abstract boolean
    isTool(org.bukkit.inventory.ItemStack itemStack)
    Check if item-stack is a tool
    boolean
    itemStackDataCompare(org.bukkit.inventory.ItemStack i, short data)
    Item Data compare This will always return true on versions major or equal 1.13
    protected void
     
    abstract org.bukkit.Material
    Cake material
    abstract org.bukkit.Material
    Crafting table material
    abstract org.bukkit.Material
    Get elytra - supports: 1.12.2+
    abstract org.bukkit.Material
    Enchanting table material
    abstract org.bukkit.Material
    Get fireball material
    abstract org.bukkit.Material
    Get gold chest plate
    abstract org.bukkit.Material
    Get gold helmet material
    abstract org.bukkit.Material
    Get gold leggings
    abstract org.bukkit.Material
    Get netherite chest plate
    abstract org.bukkit.Material
    Get netherite helmet material
    abstract org.bukkit.Material
    Get netherite leggings
    abstract org.bukkit.Material
    Player head material
    abstract org.bukkit.Material
    Get snowball material
    abstract void
    minusAmount(org.bukkit.entity.Player p, org.bukkit.inventory.ItemStack i, int amount)
    Change item amount
    abstract void
    placeLadder(org.bukkit.block.Block b, int x, int y, int z, IArena a, int ladderdata)
     
    abstract void
    placeTowerBlocks(org.bukkit.block.Block b, IArena a, TeamColor color, int x, int y, int z)
     
    abstract void
    playAction(org.bukkit.entity.Player p, String text)
    Send action-bar message
    abstract void
    playRedStoneDot(org.bukkit.entity.Player player)
     
    abstract void
    playVillagerEffect(org.bukkit.entity.Player player, org.bukkit.Location location)
     
    abstract void
    registerCommand(String name, org.bukkit.command.Command clasa)
    Register a new command as bukkit command
    abstract void
    Register custom entities
    abstract void
    registerTntWhitelist(float endStoneBlast, float glassBlast)
    Modify block blast resistance.
    abstract void
     
    abstract void
    sendPlayerSpawnPackets(org.bukkit.entity.Player player, IArena arena)
    This will send the player spawn packet after a player re-spawn.
    abstract void
    sendTitle(org.bukkit.entity.Player p, String title, String subtitle, int fadeIn, int stay, int fadeOut)
    Send title, subtitle.
    abstract void
    setBlockTeamColor(org.bukkit.block.Block block, TeamColor teamColor)
    Set block data For 1.13 support
    abstract void
    setCollide(org.bukkit.entity.Player p, IArena a, boolean value)
    Disable collisions in 1.9+
    void
     
    abstract org.bukkit.entity.Fireball
    setFireballDirection(org.bukkit.entity.Fireball fireball, org.bukkit.util.Vector vector)
    Make fireball go straight.
    abstract void
    setJoinSignBackground(org.bukkit.block.BlockState b, org.bukkit.Material material)
    Change the block behind the join sign.
    void
    setJoinSignBackgroundBlockData(org.bukkit.block.BlockState b, byte data)
    Set block data For versions before 1.13
    abstract org.bukkit.inventory.ItemStack
    setShopUpgradeIdentifier(org.bukkit.inventory.ItemStack itemStack, String identifier)
    Set an upgrade identifier
    abstract void
    setSource(org.bukkit.entity.TNTPrimed tnt, org.bukkit.entity.Player owner)
    Set tnt source
    abstract org.bukkit.inventory.ItemStack
    setTag(org.bukkit.inventory.ItemStack itemStack, String key, String value)
     
    abstract void
    setUnbreakable(org.bukkit.inventory.meta.ItemMeta itemMeta)
    Make item unbreakable.
    abstract void
    showArmor(org.bukkit.entity.Player victim, org.bukkit.entity.Player receiver)
    Show a player armor
    abstract void
    spawnDragon(org.bukkit.Location l, ITeam team)
    Spawn ender dragon
    abstract void
    spawnIronGolem(org.bukkit.Location loc, ITeam team, double speed, double health, int despawn)
    Spawn a iron-golem for a team
    abstract void
    spawnShop(org.bukkit.Location loc, String name1, List<org.bukkit.entity.Player> players, IArena arena)
    Spawn shop NPC
    abstract void
    spawnSilverfish(org.bukkit.Location loc, ITeam team, double speed, double health, int despawn, double damage)
    Spawn silverfish for a team
    void
    spigotHidePlayer(org.bukkit.entity.Player victim, org.bukkit.entity.Player receiver)
     
    void
    spigotShowPlayer(org.bukkit.entity.Player victim, org.bukkit.entity.Player receiver)
     
    abstract void
    voidKill(org.bukkit.entity.Player p)
    Void damage with cause
    abstract org.bukkit.Material
    Wool material

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PLUGIN_TAG_GENERIC_KEY

      public static String PLUGIN_TAG_GENERIC_KEY
    • PLUGIN_TAG_TIER_KEY

      public static String PLUGIN_TAG_TIER_KEY
  • Constructor Details

    • VersionSupport

      public VersionSupport(org.bukkit.plugin.Plugin plugin, String versionName)
  • Method Details

    • loadDefaultEffects

      protected void loadDefaultEffects()
    • registerCommand

      public abstract void registerCommand(String name, org.bukkit.command.Command clasa)
      Register a new command as bukkit command
    • sendTitle

      public abstract void sendTitle(org.bukkit.entity.Player p, String title, String subtitle, int fadeIn, int stay, int fadeOut)
      Send title, subtitle. null for empty
    • playAction

      public abstract void playAction(org.bukkit.entity.Player p, String text)
      Send action-bar message
    • isBukkitCommandRegistered

      public abstract boolean isBukkitCommandRegistered(String command)
      Check if bukkit command is registered
    • getItemInHand

      public abstract org.bukkit.inventory.ItemStack getItemInHand(org.bukkit.entity.Player p)
      Get in had item-stack
    • hideEntity

      public abstract void hideEntity(org.bukkit.entity.Entity e, org.bukkit.entity.Player p)
      Hide an entity
    • isArmor

      public abstract boolean isArmor(org.bukkit.inventory.ItemStack itemStack)
      Check if item-stack is armor
    • isTool

      public abstract boolean isTool(org.bukkit.inventory.ItemStack itemStack)
      Check if item-stack is a tool
    • isSword

      public abstract boolean isSword(org.bukkit.inventory.ItemStack itemStack)
      Check if item-stack is sword
    • isAxe

      public abstract boolean isAxe(org.bukkit.inventory.ItemStack itemStack)
      Check if item-stack is axe
    • isBow

      public abstract boolean isBow(org.bukkit.inventory.ItemStack itemStack)
      Check if item-stack is bow
    • isProjectile

      public abstract boolean isProjectile(org.bukkit.inventory.ItemStack itemStack)
      Check if itemstack is Projectile
    • isInvisibilityPotion

      public abstract boolean isInvisibilityPotion(org.bukkit.inventory.ItemStack itemStack)
      Check if itemstack is Invisibility Potion
    • isGlass

      public boolean isGlass(org.bukkit.Material type)
      Check if type is a Glass type material
    • registerEntities

      public abstract void registerEntities()
      Register custom entities
    • spawnShop

      public abstract void spawnShop(org.bukkit.Location loc, String name1, List<org.bukkit.entity.Player> players, IArena arena)
      Spawn shop NPC
    • getDamage

      public abstract double getDamage(org.bukkit.inventory.ItemStack i)
      Get item-stack damage amount
    • spawnSilverfish

      public abstract void spawnSilverfish(org.bukkit.Location loc, ITeam team, double speed, double health, int despawn, double damage)
      Spawn silverfish for a team
    • spawnIronGolem

      public abstract void spawnIronGolem(org.bukkit.Location loc, ITeam team, double speed, double health, int despawn)
      Spawn a iron-golem for a team
    • isDespawnable

      public boolean isDespawnable(org.bukkit.entity.Entity e)
      Is despawnable entity
    • minusAmount

      public abstract void minusAmount(org.bukkit.entity.Player p, org.bukkit.inventory.ItemStack i, int amount)
      Change item amount
    • setSource

      public abstract void setSource(org.bukkit.entity.TNTPrimed tnt, org.bukkit.entity.Player owner)
      Set tnt source
    • voidKill

      public abstract void voidKill(org.bukkit.entity.Player p)
      Void damage with cause
    • hideArmor

      public abstract void hideArmor(org.bukkit.entity.Player victim, org.bukkit.entity.Player receiver)
      Hide player armor to a player
    • showArmor

      public abstract void showArmor(org.bukkit.entity.Player victim, org.bukkit.entity.Player receiver)
      Show a player armor
    • spawnDragon

      public abstract void spawnDragon(org.bukkit.Location l, ITeam team)
      Spawn ender dragon
    • colorBed

      public abstract void colorBed(ITeam team)
      Color a bed 1.12+
    • registerTntWhitelist

      public abstract void registerTntWhitelist(float endStoneBlast, float glassBlast)
      Modify block blast resistance.
    • eggBridge

      public org.bukkit.Effect eggBridge()
      Egg bridge particles
    • setEggBridgeEffect

      public void setEggBridgeEffect(String eggBridge) throws InvalidEffectException
      Throws:
      InvalidEffectException
    • setBlockTeamColor

      public abstract void setBlockTeamColor(org.bukkit.block.Block block, TeamColor teamColor)
      Set block data For 1.13 support
    • setCollide

      public abstract void setCollide(org.bukkit.entity.Player p, IArena a, boolean value)
      Disable collisions in 1.9+
    • addCustomData

      public abstract org.bukkit.inventory.ItemStack addCustomData(org.bukkit.inventory.ItemStack i, String data)
      Add custom data to an ItemStack
    • setTag

      public abstract org.bukkit.inventory.ItemStack setTag(org.bukkit.inventory.ItemStack itemStack, String key, String value)
    • getTag

      public abstract String getTag(org.bukkit.inventory.ItemStack itemStack, String key)
      Get a custom item tag.
      Returns:
      null if not present.
    • isCustomBedWarsItem

      public abstract boolean isCustomBedWarsItem(org.bukkit.inventory.ItemStack i)
      Check if an item has a BedWars1058 NBTTag
    • getCustomData

      public abstract String getCustomData(org.bukkit.inventory.ItemStack i)
      Get the NBTTag from a BedWars1058 item
    • colourItem

      public abstract org.bukkit.inventory.ItemStack colourItem(org.bukkit.inventory.ItemStack itemStack, ITeam bedWarsTeam)
      Color an item if possible with the team's color
    • createItemStack

      public abstract org.bukkit.inventory.ItemStack createItemStack(String material, int amount, short data)
    • isPlayerHead

      public boolean isPlayerHead(String material, int data)
      Check if is a player head
    • materialFireball

      public abstract org.bukkit.Material materialFireball()
      Get fireball material
    • materialPlayerHead

      public abstract org.bukkit.Material materialPlayerHead()
      Player head material
    • materialSnowball

      public abstract org.bukkit.Material materialSnowball()
      Get snowball material
    • materialGoldenHelmet

      public abstract org.bukkit.Material materialGoldenHelmet()
      Get gold helmet material
    • materialGoldenChestPlate

      public abstract org.bukkit.Material materialGoldenChestPlate()
      Get gold chest plate
    • materialGoldenLeggings

      public abstract org.bukkit.Material materialGoldenLeggings()
      Get gold leggings
    • materialNetheriteHelmet

      public abstract org.bukkit.Material materialNetheriteHelmet()
      Get netherite helmet material
    • materialNetheriteChestPlate

      public abstract org.bukkit.Material materialNetheriteChestPlate()
      Get netherite chest plate
    • materialNetheriteLeggings

      public abstract org.bukkit.Material materialNetheriteLeggings()
      Get netherite leggings
    • materialElytra

      public abstract org.bukkit.Material materialElytra()
      Get elytra - supports: 1.12.2+
    • materialCake

      public abstract org.bukkit.Material materialCake()
      Cake material
    • materialCraftingTable

      public abstract org.bukkit.Material materialCraftingTable()
      Crafting table material
    • materialEnchantingTable

      public abstract org.bukkit.Material materialEnchantingTable()
      Enchanting table material
    • isBed

      public boolean isBed(org.bukkit.Material material)
      Check if bed
    • itemStackDataCompare

      public boolean itemStackDataCompare(org.bukkit.inventory.ItemStack i, short data)
      Item Data compare This will always return true on versions major or equal 1.13
    • setJoinSignBackgroundBlockData

      public void setJoinSignBackgroundBlockData(org.bukkit.block.BlockState b, byte data)
      Set block data For versions before 1.13
    • setJoinSignBackground

      public abstract void setJoinSignBackground(org.bukkit.block.BlockState b, org.bukkit.Material material)
      Change the block behind the join sign.
    • woolMaterial

      public abstract org.bukkit.Material woolMaterial()
      Wool material
    • getShopUpgradeIdentifier

      public abstract String getShopUpgradeIdentifier(org.bukkit.inventory.ItemStack itemStack)
      Get an ItemStack identifier will return null text if it does not have an identifier
    • setShopUpgradeIdentifier

      public abstract org.bukkit.inventory.ItemStack setShopUpgradeIdentifier(org.bukkit.inventory.ItemStack itemStack, String identifier)
      Set an upgrade identifier
    • getPlayerHead

      public abstract org.bukkit.inventory.ItemStack getPlayerHead(org.bukkit.entity.Player player, @Nullable @Nullable org.bukkit.inventory.ItemStack copyTagFrom)
      Get player head with skin.
      Parameters:
      copyTagFrom - will copy nbt tag from this item.
    • sendPlayerSpawnPackets

      public abstract void sendPlayerSpawnPackets(org.bukkit.entity.Player player, IArena arena)
      This will send the player spawn packet after a player re-spawn.

      Show the target player to players and spectators in the arena.

    • getInventoryName

      public abstract String getInventoryName(org.bukkit.event.inventory.InventoryEvent e)
      Get inventory name.
    • setUnbreakable

      public abstract void setUnbreakable(org.bukkit.inventory.meta.ItemMeta itemMeta)
      Make item unbreakable.
    • getDespawnablesList

      public ConcurrentHashMap<UUID,Despawnable> getDespawnablesList()
      Get list of entities that are going to despawn based on a timer.
    • getName

      public static String getName()
    • getVersion

      public abstract int getVersion()
    • getPlugin

      public org.bukkit.plugin.Plugin getPlugin()
    • registerVersionListeners

      public abstract void registerVersionListeners()
    • getMainLevel

      public abstract String getMainLevel()
      Get main level name.
    • getCompressedAngle

      public byte getCompressedAngle(float value)
    • spigotShowPlayer

      public void spigotShowPlayer(org.bukkit.entity.Player victim, org.bukkit.entity.Player receiver)
    • spigotHidePlayer

      public void spigotHidePlayer(org.bukkit.entity.Player victim, org.bukkit.entity.Player receiver)
    • setFireballDirection

      public abstract org.bukkit.entity.Fireball setFireballDirection(org.bukkit.entity.Fireball fireball, org.bukkit.util.Vector vector)
      Make fireball go straight.
      Parameters:
      fireball - fireball instance;
      vector - fireball direction to normalize.
      Returns:
      modified fireball.
    • playRedStoneDot

      public abstract void playRedStoneDot(org.bukkit.entity.Player player)
    • clearArrowsFromPlayerBody

      public abstract void clearArrowsFromPlayerBody(org.bukkit.entity.Player player)
    • placeTowerBlocks

      public abstract void placeTowerBlocks(org.bukkit.block.Block b, IArena a, TeamColor color, int x, int y, int z)
    • placeLadder

      public abstract void placeLadder(org.bukkit.block.Block b, int x, int y, int z, IArena a, int ladderdata)
    • playVillagerEffect

      public abstract void playVillagerEffect(org.bukkit.entity.Player player, org.bukkit.Location location)