Class VersionSupport


  • public abstract class VersionSupport
    extends java.lang.Object
    • Constructor Summary

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

      Modifier and Type Method Description
      abstract org.bukkit.inventory.ItemStack addCustomData​(org.bukkit.inventory.ItemStack i, java.lang.String data)
      Add custom data to an ItemStack Adds a NBTTag to the item with BedWars1058 key
      org.bukkit.Sound bedDestroy()
      Get bed-destroy sound
      org.bukkit.Sound bought()
      Get boy success sound
      abstract void colorBed​(ITeam team)
      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
      org.bukkit.Sound countdownTick()
      Get countdown sound
      abstract org.bukkit.inventory.ItemStack createItemStack​(java.lang.String material, int amount, short data)  
      org.bukkit.Effect eggBridge()
      Egg bridge particles
      abstract java.lang.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
      java.util.HashMap<java.util.UUID,​Despawnable> getDespawnablesList()
      Get list of entities that are going to despawn based on a timer.
      abstract java.lang.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 java.lang.String getMainLevel()
      Get main level name.
      static java.lang.String getName()  
      abstract org.bukkit.inventory.ItemStack getPlayerHead​(org.bukkit.entity.Player player)
      Get player head with skin.
      org.bukkit.plugin.Plugin getPlugin()  
      abstract java.lang.String getShopUpgradeIdentifier​(org.bukkit.inventory.ItemStack itemStack)
      Get an ItemStack identifier will return null text if it does not have an identifier
      abstract int getVersion()  
      abstract void hideArmor​(org.bukkit.entity.Player p, org.bukkit.entity.Player p2)
      Hide player armor to a player
      abstract void hideEntity​(org.bukkit.entity.Entity e, org.bukkit.entity.Player p)
      Hide an entity
      abstract void hidePlayer​(org.bukkit.entity.Player whoToShow, java.util.List<org.bukkit.entity.Player> players)
      Hide a player
      abstract void hidePlayer​(org.bukkit.entity.Player whoToShow, org.bukkit.entity.Player p)
      Hide a player
      org.bukkit.Sound insufficientMoney()
      Get insufficient money sound
      abstract void invisibilityFix​(org.bukkit.entity.Player player, IArena arena)
      This will send the player spawn packet after a player respawn.
      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 isBukkitCommandRegistered​(java.lang.String command)
      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 isPlayerHead​(java.lang.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 loadDefaultSounds()  
      abstract org.bukkit.Material materialCake()
      Cake material
      abstract org.bukkit.Material materialCraftingTable()
      Crafting table material
      abstract org.bukkit.Material materialEnchantingTable()
      Enchanting table material
      abstract org.bukkit.Material materialFireball()
      Get fireball material
      abstract org.bukkit.Material materialGoldenChestPlate()
      Get gold chest plate
      abstract org.bukkit.Material materialGoldenHelmet()
      Get gold helmet material
      abstract org.bukkit.Material materialGoldenLeggings()
      Get gold leggings
      abstract org.bukkit.Material materialPlayerHead()
      Player head material
      abstract org.bukkit.Material materialSnowball()
      Get snowball material
      abstract void minusAmount​(org.bukkit.entity.Player p, org.bukkit.inventory.ItemStack i, int amount)
      Change item amount
      abstract void playAction​(org.bukkit.entity.Player p, java.lang.String text)
      Send action-bar message
      org.bukkit.Sound playerKill()
      Get player-kill sound
      abstract void registerCommand​(java.lang.String name, org.bukkit.command.Command clasa)
      Register a new command as bukkit command
      abstract void registerEntities()
      Register custom entities
      abstract void registerTntWhitelist()
      Register tnt whitelist
      abstract void registerVersionListeners()  
      abstract void sendTitle​(org.bukkit.entity.Player p, java.lang.String title, java.lang.String subtitle, int fadeIn, int stay, int fadeOut)
      Send title, subtitle.
      void setBedDestroySound​(java.lang.String sound)
      Set the bed destroy sound
      abstract void setBlockTeamColor​(org.bukkit.block.Block block, TeamColor teamColor)
      Set block data For 1.13 support
      void setBoughtSound​(java.lang.String sound)
      Set the bought sound
      abstract void setCollide​(org.bukkit.entity.Player p, IArena a, boolean value)
      Disable collisions in 1.9+
      void setCountdownSound​(java.lang.String sound)
      Set countdown tick sound
      void setEggBridgeEffect​(java.lang.String eggBridge)  
      void setInsuffMoneySound​(java.lang.String sound)
      Set the insufficient money sound
      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
      void setPlayerKillsSound​(java.lang.String sound)
      Set the player kill sound
      abstract org.bukkit.inventory.ItemStack setShopUpgradeIdentifier​(org.bukkit.inventory.ItemStack itemStack, java.lang.String identifier)
      Set an upgrade identifier
      abstract org.bukkit.inventory.ItemStack setSkullOwner​(org.bukkit.inventory.ItemStack i, org.bukkit.entity.Player p)
      Set a skull skin
      abstract void setSource​(org.bukkit.entity.TNTPrimed tnt, org.bukkit.entity.Player owner)
      Set tnt source
      abstract void setUnbreakable​(org.bukkit.inventory.meta.ItemMeta itemMeta)
      Make item unbreakable.
      abstract void showArmor​(org.bukkit.entity.Player p, org.bukkit.entity.Player p2)
      Show a player armor
      abstract void showPlayer​(org.bukkit.entity.Player whoToShow, org.bukkit.entity.Player p)
      Show a player
      abstract void spawnDragon​(org.bukkit.Location l, ITeam team)
      Spawn ender dragon
      abstract void spawnIronGolem​(org.bukkit.Location loc, ITeam team, int speed, int health, int despawn)
      Spawn a iron-golem for a team
      abstract void spawnShop​(org.bukkit.Location loc, java.lang.String name1, java.util.List<org.bukkit.entity.Player> players, IArena arena)
      Spawn shop NPC
      abstract void spawnSilverfish​(org.bukkit.Location loc, ITeam team, int speed, int health, int despawn, int damage)
      Spawn silverfish for a team
      abstract void teamCollideRule​(org.bukkit.scoreboard.Team team)  
      abstract void voidKill​(org.bukkit.entity.Player p)
      Void damage with cause
      abstract org.bukkit.Material woolMaterial()
      Wool material
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VersionSupport

        public VersionSupport​(org.bukkit.plugin.Plugin plugin,
                              java.lang.String versionName)
    • Method Detail

      • loadDefaultSounds

        protected void loadDefaultSounds()
      • registerCommand

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

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

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

        public abstract boolean isBukkitCommandRegistered​(java.lang.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
      • registerEntities

        public abstract void registerEntities()
        Register custom entities
      • spawnShop

        public abstract void spawnShop​(org.bukkit.Location loc,
                                       java.lang.String name1,
                                       java.util.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
      • bedDestroy

        public org.bukkit.Sound bedDestroy()
        Get bed-destroy sound
      • playerKill

        public org.bukkit.Sound playerKill()
        Get player-kill sound
      • insufficientMoney

        public org.bukkit.Sound insufficientMoney()
        Get insufficient money sound
      • bought

        public org.bukkit.Sound bought()
        Get boy success sound
      • countdownTick

        public org.bukkit.Sound countdownTick()
        Get countdown sound
      • spawnSilverfish

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

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

        public abstract void hidePlayer​(org.bukkit.entity.Player whoToShow,
                                        java.util.List<org.bukkit.entity.Player> players)
        Hide a player
      • hidePlayer

        public abstract void hidePlayer​(org.bukkit.entity.Player whoToShow,
                                        org.bukkit.entity.Player p)
        Hide a player
      • showPlayer

        public abstract void showPlayer​(org.bukkit.entity.Player whoToShow,
                                        org.bukkit.entity.Player p)
        Show a player
        Parameters:
        whoToShow - this player will be shown for the second param

        For 1.13 is using - #showPlayer​(Plugin plugin, Player player)

      • 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 p,
                                       org.bukkit.entity.Player p2)
        Hide player armor to a player
      • showArmor

        public abstract void showArmor​(org.bukkit.entity.Player p,
                                       org.bukkit.entity.Player p2)
        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()
        Register tnt whitelist
      • eggBridge

        public org.bukkit.Effect eggBridge()
        Egg bridge particles
      • 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,
                                                                     java.lang.String data)
        Add custom data to an ItemStack Adds a NBTTag to the item with BedWars1058 key
      • isCustomBedWarsItem

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

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

        public abstract org.bukkit.inventory.ItemStack setSkullOwner​(org.bukkit.inventory.ItemStack i,
                                                                     org.bukkit.entity.Player p)
        Set a skull skin
      • 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​(java.lang.String material,
                                                                       int amount,
                                                                       short data)
      • teamCollideRule

        public abstract void teamCollideRule​(org.bukkit.scoreboard.Team team)
      • isPlayerHead

        public boolean isPlayerHead​(java.lang.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
      • 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 java.lang.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,
                                                                                java.lang.String identifier)
        Set an upgrade identifier
      • getPlayerHead

        public abstract org.bukkit.inventory.ItemStack getPlayerHead​(org.bukkit.entity.Player player)
        Get player head with skin.
      • invisibilityFix

        public abstract void invisibilityFix​(org.bukkit.entity.Player player,
                                             IArena arena)
        This will send the player spawn packet after a player respawn.

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

      • getInventoryName

        public abstract java.lang.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 java.util.HashMap<java.util.UUID,​Despawnable> getDespawnablesList()
        Get list of entities that are going to despawn based on a timer.
      • getName

        public static java.lang.String getName()
      • getVersion

        public abstract int getVersion()
      • getPlugin

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

        public abstract void registerVersionListeners()
      • getMainLevel

        public abstract java.lang.String getMainLevel()
        Get main level name.