public class PartyVsBots extends AbstractFight implements BotFight, PartyFight, BestOfFight
arena, bed1Broken, bed2Broken, blockChanges, blockLimitReached, currentFight, durationLimit, kit, maxBlockChanges, playersInFight, started, statistics| Constructor and Description |
|---|
PartyVsBots(StrikePractice plugin,
Party party,
BattleKit kit) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowSpectating()
Gets if specatting is allowed in the fight.
|
boolean |
canStart()
Gets if the fight can be started.
|
java.lang.String |
difficulty()
Gets the difficulty of the fight.
|
void |
forceEnd(java.lang.String reason) |
java.util.Set<PracticeBot> |
getAliveBots() |
java.util.Set<java.lang.String> |
getAlivePlayers() |
BestOf |
getBestOf() |
java.util.Collection<PracticeBot> |
getBots()
Gets a collection of practice bots participating in the fight.
|
java.util.HashSet<PracticeBot> |
getBotsAlive() |
java.util.UUID |
getBotsBestOfId() |
java.util.HashMap<PracticeBot,java.lang.Boolean> |
getBotsTeam()
Deprecated.
Use
getBots() |
CitizensNPC.Difficulty |
getDifficulty()
Gets the difficulty of the fight using the deprecated method.
|
java.util.List<java.lang.String> |
getOpponents(Player p)
Only alive bots are included
|
Party[] |
getParties() |
java.util.UUID |
getPartyBestOfId() |
java.util.Set<java.lang.String> |
getPlayers() |
java.util.HashSet<java.lang.String> |
getPlayersAlive()
Deprecated.
|
java.util.HashSet<java.lang.String> |
getPlayersTeam()
Deprecated.
Use
getPlayers() |
java.util.List<java.lang.String> |
getTeammates(Player p)
The given player should be included in the list.
|
void |
handleBotDeath(Metadatable ent)
Handles the death of a bot in the fight.
|
void |
handleDeath(Player p)
This will be called when the player died
|
boolean |
hasEnded()
Gets if this fight has ended.
|
boolean |
isBreakTime()
Whether the fight is waiting for the arena to reset before next round
|
void |
remove(Player p,
boolean surrendered,
boolean lobby)
Removes the player from this fight entirely — rosters, alive lists and the
current-fight map.
|
void |
setBestOf(BestOf bestOf) |
void |
setDifficulty(java.lang.String difficulty)
Sets the difficulty of the fight.
|
void |
start()
Starts the actual fight
|
addBlockChange, backToLobby, clearBlockChanges, getArena, getBlockChanges, getBlockChangesMap, getCurrentFight, getDuration, getDurationLimit, getEnded, getFights, getKit, getMaxBlockChanges, getPlayersInFight, getStarted, getStatistics, getStatistics, getStatistics, handleDisappear, isBed1Broken, isBed2Broken, isInFight, resetFightStatisticsForNextRound, setArena, setBed1Broken, setBed2Broken, setCurrentFight, setKit, setMaxBlockChanges, setStartedAfterCountdown, skipRoundCountdownclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetDifficultyaddBlockChange, clearBlockChanges, forceEndDelayed, getArena, getBlockChanges, getBlockChangesMap, getDuration, getDurationLimit, getEnded, getFightStatistics, getFightStatistics, getKit, getPlayerNames, getPlayersInFight, getSpectators, getStarted, getStatistics, getStatistics, getStatistics, hasStarted, isActiveFighter, playersAreOpponents, playersAreTeammates, saveFight, setArena, setKit, setStartedAfterCountdown, skipRoundCountdownpublic void start()
Fightstart in interface Fightstart in class AbstractFightpublic Party[] getParties()
getParties in interface PartyFightpublic boolean allowSpectating()
FightallowSpectating in interface Fightpublic boolean hasEnded()
public boolean canStart()
Fightpublic void remove(Player p,
boolean surrendered,
boolean lobby)
FightFight.handleDeath(Player), the player will not
be part of any future rounds of this fight.remove in interface Fightp - player to removesurrendered - true if the removal counts as a loss/forfeit (the opponent
wins a 1v1 and the current round is resolved), false for a
neutral removal (no winner declared where avoidable)lobby - whether to teleport the player to the lobby after removalpublic void handleDeath(Player p)
FighthandleDeath in interface Fightp - player who died.public BestOf getBestOf()
getBestOf in interface BestOfFightpublic void setBestOf(BestOf bestOf)
setBestOf in interface BestOfFightpublic boolean isBreakTime()
BestOfFightisBreakTime in interface BestOfFight@Deprecated public java.util.HashMap<PracticeBot,java.lang.Boolean> getBotsTeam()
getBots()@Deprecated public java.util.HashSet<java.lang.String> getPlayersTeam()
getPlayers()public java.util.Set<java.lang.String> getPlayers()
@Deprecated public java.util.HashSet<java.lang.String> getPlayersAlive()
public java.util.Set<java.lang.String> getAlivePlayers()
public java.util.HashSet<PracticeBot> getBotsAlive()
public java.util.List<java.lang.String> getTeammates(Player p)
FightgetTeammates in interface Fightpublic java.util.List<java.lang.String> getOpponents(Player p)
getOpponents in interface Fightpublic java.util.Set<PracticeBot> getAliveBots()
public CitizensNPC.Difficulty getDifficulty()
BotFightgetDifficulty in interface BotFightpublic java.lang.String difficulty()
BotFightdifficulty in interface BotFightpublic void setDifficulty(java.lang.String difficulty)
BotFightsetDifficulty in interface BotFightdifficulty - The difficulty of the fight as a string.public void handleBotDeath(Metadatable ent)
BotFighthandleBotDeath in interface BotFightent - The Metadatable object representing the deceased bot.public java.util.Collection<PracticeBot> getBots()
BotFightpublic java.util.UUID getPartyBestOfId()
public java.util.UUID getBotsBestOfId()