Interface ITeam
public interface ITeam
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddArmorEnchantment(org.bukkit.enchantments.Enchantment e, int a) Used when someone buys a new enchantment with apply == armor.voidaddBaseEffect(org.bukkit.potion.PotionEffectType pef, int amp, int duration) Used when someone buys a new potion effect with apply == basevoidaddBowEnchantment(org.bukkit.enchantments.Enchantment e, int a) Used when someone buys a bew enchantment with apply == bow.voidaddDragon(org.bukkit.entity.EnderDragon dragon) Assign a dragon to a teamvoidaddPlayers(org.bukkit.entity.Player... players) Add a new member to the team.voidaddSwordEnchantment(org.bukkit.enchantments.Enchantment e, int a) Used when someone buys a new enchantment with apply == sword.voidaddTeamEffect(org.bukkit.potion.PotionEffectType pef, int amp, int duration) Used when someone buys a new potion effect with apply == membersvoiddefaultSword(org.bukkit.entity.Player p, boolean value) Restore lost default sword.voiddestroyBedHolo(String iso) Destroy bed hologram for playervoiddestroyBedHolo(org.bukkit.entity.Player player) Destroy bed hologram for playervoidDestroy team data when the arena restarts.voidfirstSpawn(org.bukkit.entity.Player p) Spawn a player for the first spawn.Get queued traps for a team.getArena()Get the team arena.Get enchantments to be applied on armors.List<org.bukkit.potion.PotionEffect> Get list of effects that you gen when you enter the base.org.bukkit.LocationgetBed()Get bed location.org.bukkit.entity.PlayerGet the bed destroyergetBedHologram(String iso) Get the bed hologram of a languageGet enchantments to be applied on bows.getColor()Get team color.getDisplayName(Language language) Get team display name.intGet team dragons amount for the sudden death phase.List<org.bukkit.entity.EnderDragon> Get all dragons that are currently spawned for this team.Get team generators.org.bukkit.util.VectorGet the location where enemy items are dropped after you kill him.List<org.bukkit.entity.Player> Get alive team members.List<org.bukkit.entity.Player> Get all cached team membersgetName()Get team name.org.bukkit.LocationgetShop()Get shop keeper location.intgetSize()Get team current size.org.bukkit.LocationgetSpawn()Get team spawn location.Get enchantments to be applied on swords.org.bukkit.LocationGet team upgrades location.Get list of team upgrades.booleanisBed(@NotNull org.bukkit.Location location) booleanCheck if team's bed was destroyed.booleanisMember(org.bukkit.entity.Player player) Check if is member.booleanCheck if the shop has been spawned.voidreJoin(org.bukkit.entity.Player p) Rejoin a team.voidreJoin(org.bukkit.entity.Player p, int respawnTime) Rejoin a team.voidrespawnMember(org.bukkit.entity.Player p) Respawn a member.voidsendArmor(org.bukkit.entity.Player p) Equip a player with default armor.voidsendDefaultInventory(org.bukkit.entity.Player p, boolean clear) Gives the start inventoryvoidsetBedDestroyed(boolean bedDestroyed) This will also disable team generators if true.voidsetBedDestroyer(org.bukkit.entity.Player bedDestroyer) Set the bed destoryer for the teamvoidsetDragonAmount(int amount) Set a team dragons amount for the sudden death phase.voidsetKillDropsLocation(org.bukkit.util.Vector location) Change the location where to drop items after you kill an enemy.voidSpawn shopkeepers for target team (if enabled).booleanCheck if target has played in this match.
-
Method Details
-
getColor
TeamColor getColor()Get team color. -
getName
String getName()Get team name. -
getDisplayName
Get team display name.- Parameters:
language- get the display name in target language.
-
isMember
boolean isMember(org.bukkit.entity.Player player) Check if is member.- Parameters:
player- target player.
-
isShopSpawned
boolean isShopSpawned()Check if the shop has been spawned.- Returns:
- true if the shop has been spawned.
-
getArena
IArena getArena()Get the team arena. -
getMembers
List<org.bukkit.entity.Player> getMembers()Get alive team members. -
defaultSword
void defaultSword(org.bukkit.entity.Player p, boolean value) Restore lost default sword.- Parameters:
p- target player.value- true to give the sword.
-
getBed
org.bukkit.Location getBed()Get bed location. -
getBedHologram
Get the bed hologram of a language- Parameters:
iso- target language ISO code.
-
setBedDestroyer
void setBedDestroyer(org.bukkit.entity.Player bedDestroyer) Set the bed destoryer for the team- Parameters:
bedDestroyer- target player.
-
getBedDestroyer
org.bukkit.entity.Player getBedDestroyer()Get the bed destroyer -
getTeamUpgradeTiers
ConcurrentHashMap<String,Integer> getTeamUpgradeTiers()Get list of team upgrades. Upgrade identifier, tier. -
getBowsEnchantments
List<TeamEnchant> getBowsEnchantments()Get enchantments to be applied on bows. -
getSwordsEnchantments
List<TeamEnchant> getSwordsEnchantments()Get enchantments to be applied on swords. -
getArmorsEnchantments
List<TeamEnchant> getArmorsEnchantments()Get enchantments to be applied on armors. -
getSize
int getSize()Get team current size. -
addPlayers
void addPlayers(org.bukkit.entity.Player... players) Add a new member to the team. Be careful! This will cache players on this team until the game is finished so you can retrieve who played here withwasMember(UUID).- Parameters:
players- players to be added.
-
firstSpawn
void firstSpawn(org.bukkit.entity.Player p) Spawn a player for the first spawn.- Parameters:
p- target player.
-
spawnNPCs
void spawnNPCs()Spawn shopkeepers for target team (if enabled). -
reJoin
void reJoin(org.bukkit.entity.Player p) Rejoin a team.- Parameters:
p- target player.
-
reJoin
void reJoin(org.bukkit.entity.Player p, int respawnTime) Rejoin a team.- Parameters:
p- target player.respawnTime- the time until the player should respawn.
-
sendDefaultInventory
void sendDefaultInventory(org.bukkit.entity.Player p, boolean clear) Gives the start inventory- Parameters:
p- target player.clear- true to clear inventory.
-
respawnMember
void respawnMember(org.bukkit.entity.Player p) Respawn a member. This is after respawn countdown.- Parameters:
p- target player.
-
sendArmor
void sendArmor(org.bukkit.entity.Player p) Equip a player with default armor.- Parameters:
p- target player.
-
addTeamEffect
void addTeamEffect(org.bukkit.potion.PotionEffectType pef, int amp, int duration) Used when someone buys a new potion effect with apply == members- Parameters:
pef- effect.amp- amplifier.duration- duration.
-
addBaseEffect
void addBaseEffect(org.bukkit.potion.PotionEffectType pef, int amp, int duration) Used when someone buys a new potion effect with apply == base- Parameters:
pef- effect.amp- amplifier.duration- duration.
-
getBaseEffects
List<org.bukkit.potion.PotionEffect> getBaseEffects()Get list of effects that you gen when you enter the base. -
addBowEnchantment
void addBowEnchantment(org.bukkit.enchantments.Enchantment e, int a) Used when someone buys a bew enchantment with apply == bow.- Parameters:
e- enchant.a- amplifier.
-
addSwordEnchantment
void addSwordEnchantment(org.bukkit.enchantments.Enchantment e, int a) Used when someone buys a new enchantment with apply == sword.- Parameters:
e- enchant.a- amplifier.
-
addArmorEnchantment
void addArmorEnchantment(org.bukkit.enchantments.Enchantment e, int a) Used when someone buys a new enchantment with apply == armor.- Parameters:
e- enchant.a- amplifier.
-
wasMember
Check if target has played in this match.- Parameters:
u- player uuid.
-
isBedDestroyed
boolean isBedDestroyed()Check if team's bed was destroyed.- Returns:
- true if players are no longer able to respawn.
-
getSpawn
org.bukkit.Location getSpawn()Get team spawn location.- Returns:
- spawn point.
-
getShop
org.bukkit.Location getShop()Get shop keeper location.- Returns:
- shop point.
-
getTeamUpgrades
org.bukkit.Location getTeamUpgrades()Get team upgrades location.- Returns:
- upgrades point.
-
setBedDestroyed
void setBedDestroyed(boolean bedDestroyed) This will also disable team generators if true.- Parameters:
bedDestroyed- team members will no longer be able to respawn if you set this to true.
-
getGenerators
List<IGenerator> getGenerators()Get team generators.- Returns:
- team generators.
-
getDragonAmount
int getDragonAmount()Get team dragons amount for the sudden death phase. -
setDragonAmount
void setDragonAmount(int amount) Set a team dragons amount for the sudden death phase. -
getMembersCache
List<org.bukkit.entity.Player> getMembersCache()Get all cached team members -
getDragons
List<org.bukkit.entity.EnderDragon> getDragons()Get all dragons that are currently spawned for this team. Can only be used in the ENDER_DRAGON phase, will otherwise be empty -
addDragon
void addDragon(org.bukkit.entity.EnderDragon dragon) Assign a dragon to a team- Parameters:
dragon- Dragon entity
-
destroyData
void destroyData()Destroy team data when the arena restarts. This must be called by BedWars2023 only. -
destroyBedHolo
void destroyBedHolo(org.bukkit.entity.Player player) Destroy bed hologram for player- Parameters:
player- target player.
-
destroyBedHolo
Destroy bed hologram for player- Parameters:
iso- target language ISO code.
-
getActiveTraps
LinkedList<EnemyBaseEnterTrap> getActiveTraps()Get queued traps for a team.- Returns:
- active traps list.
-
getKillDropsLocation
org.bukkit.util.Vector getKillDropsLocation()Get the location where enemy items are dropped after you kill him.- Returns:
- x, y, z.
-
setKillDropsLocation
void setKillDropsLocation(org.bukkit.util.Vector location) Change the location where to drop items after you kill an enemy.- Parameters:
location- x,y,z.
-
isBed
boolean isBed(@NotNull @NotNull org.bukkit.Location location)
-