Class VersionSupport
java.lang.Object
com.andrei1058.bedwars.api.server.VersionSupport
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract org.bukkit.inventory.ItemStack
addCustomData
(org.bukkit.inventory.ItemStack i, String data) Add custom data to an ItemStackabstract 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 colorabstract org.bukkit.inventory.ItemStack
createItemStack
(String material, int amount, short data) org.bukkit.Effect
Egg bridge particlesbyte
getCompressedAngle
(float value) abstract String
getCustomData
(org.bukkit.inventory.ItemStack i) Get the NBTTag from a BedWars1058 itemabstract double
getDamage
(org.bukkit.inventory.ItemStack i) Get item-stack damage amountGet 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-stackabstract String
Get main level name.static String
getName()
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 identifierabstract String
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 playerabstract void
hideEntity
(org.bukkit.entity.Entity e, org.bukkit.entity.Player p) Hide an entityabstract boolean
isArmor
(org.bukkit.inventory.ItemStack itemStack) Check if item-stack is armorabstract boolean
isAxe
(org.bukkit.inventory.ItemStack itemStack) Check if item-stack is axeboolean
isBed
(org.bukkit.Material material) Check if bedabstract boolean
isBow
(org.bukkit.inventory.ItemStack itemStack) Check if item-stack is bowabstract boolean
isBukkitCommandRegistered
(String command) Check if bukkit command is registeredabstract boolean
isCustomBedWarsItem
(org.bukkit.inventory.ItemStack i) Check if an item has a BedWars1058 NBTTagboolean
isDespawnable
(org.bukkit.entity.Entity e) Is despawnable entityboolean
isGlass
(org.bukkit.Material type) Check if type is a Glass type materialabstract boolean
isInvisibilityPotion
(org.bukkit.inventory.ItemStack itemStack) Check if itemstack is Invisibility Potionboolean
isPlayerHead
(String material, int data) Check if is a player headabstract boolean
isProjectile
(org.bukkit.inventory.ItemStack itemStack) Check if itemstack is Projectileabstract boolean
isSword
(org.bukkit.inventory.ItemStack itemStack) Check if item-stack is swordabstract boolean
isTool
(org.bukkit.inventory.ItemStack itemStack) Check if item-stack is a toolboolean
itemStackDataCompare
(org.bukkit.inventory.ItemStack i, short data) Item Data compare This will always return true on versions major or equal 1.13protected void
abstract org.bukkit.Material
Cake materialabstract org.bukkit.Material
Crafting table materialabstract org.bukkit.Material
Get elytra - supports: 1.12.2+abstract org.bukkit.Material
Enchanting table materialabstract org.bukkit.Material
Get fireball materialabstract org.bukkit.Material
Get gold chest plateabstract org.bukkit.Material
Get gold helmet materialabstract org.bukkit.Material
Get gold leggingsabstract org.bukkit.Material
Get netherite chest plateabstract org.bukkit.Material
Get netherite helmet materialabstract org.bukkit.Material
Get netherite leggingsabstract org.bukkit.Material
Player head materialabstract org.bukkit.Material
Get snowball materialabstract void
minusAmount
(org.bukkit.entity.Player p, org.bukkit.inventory.ItemStack i, int amount) Change item amountabstract 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 messageabstract 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 commandabstract void
Register custom entitiesabstract 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 supportabstract void
setCollide
(org.bukkit.entity.Player p, IArena a, boolean value) Disable collisions in 1.9+void
setEggBridgeEffect
(String eggBridge) 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.13abstract org.bukkit.inventory.ItemStack
setShopUpgradeIdentifier
(org.bukkit.inventory.ItemStack itemStack, String identifier) Set an upgrade identifierabstract void
setSource
(org.bukkit.entity.TNTPrimed tnt, org.bukkit.entity.Player owner) Set tnt sourceabstract org.bukkit.inventory.ItemStack
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 armorabstract void
spawnDragon
(org.bukkit.Location l, ITeam team) Spawn ender dragonabstract void
spawnIronGolem
(org.bukkit.Location loc, ITeam team, double speed, double health, int despawn) Spawn a iron-golem for a teamabstract void
spawnShop
(org.bukkit.Location loc, String name1, List<org.bukkit.entity.Player> players, IArena arena) Spawn shop NPCabstract void
spawnSilverfish
(org.bukkit.Location loc, ITeam team, double speed, double health, int despawn, double damage) Spawn silverfish for a teamvoid
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 causeabstract org.bukkit.Material
Wool material
-
Field Details
-
PLUGIN_TAG_GENERIC_KEY
-
PLUGIN_TAG_TIER_KEY
-
-
Constructor Details
-
VersionSupport
-
-
Method Details
-
loadDefaultEffects
protected void loadDefaultEffects() -
registerCommand
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
Send action-bar message -
isBukkitCommandRegistered
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
Spawn ender dragon -
colorBed
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
- Throws:
InvalidEffectException
-
setBlockTeamColor
Set block data For 1.13 support -
setCollide
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
-
getTag
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
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
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
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
This will send the player spawn packet after a player re-spawn.Show the target player to players and spectators in the arena.
-
getInventoryName
Get inventory name. -
setUnbreakable
public abstract void setUnbreakable(org.bukkit.inventory.meta.ItemMeta itemMeta) Make item unbreakable. -
getDespawnablesList
Get list of entities that are going to despawn based on a timer. -
getName
-
getVersion
public abstract int getVersion() -
getPlugin
public org.bukkit.plugin.Plugin getPlugin() -
registerVersionListeners
public abstract void registerVersionListeners() -
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
-
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)
-