public class BotDuel extends AbstractFight implements BotFight, Recordable, BestOfFight
arena, bed1Broken, bed2Broken, blockChanges, blockLimitReached, currentFight, durationLimit, kit, maxBlockChanges, started, statistics| Constructor and Description |
|---|
BotDuel(StrikePractice plugin,
java.lang.String p1,
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) |
BestOf |
getBestOf() |
java.lang.String |
getBotName() |
java.util.Collection<PracticeBot> |
getBots()
Gets a collection of practice bots participating in the fight.
|
CitizensNPC.Difficulty |
getDifficulty()
Gets the difficulty of the fight using the deprecated method.
|
java.util.List<java.lang.String> |
getOpponents(Player p)
Dead players should be included in the list if online.
|
java.lang.String |
getP1()
Gets the first player of this duel.
|
PracticeBot |
getP2() |
FightRecorder |
getRecorder() |
java.util.List<java.lang.String> |
getTeammates(Player p)
The given player should be included in the list.
|
void |
handleBotDeath(Metadatable metadatable)
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
|
boolean |
playersAreTeammates(Player one,
Player two) |
void |
setArena(Arena arena)
Sets the arena of this duel.
|
void |
setBestOf(BestOf bestOf) |
void |
setDifficulty(java.lang.String difficulty)
Sets the difficulty of the fight.
|
void |
start()
Starts the actual fight
|
addBlockChange, clearBlockChanges, getArena, getBlockChanges, getBlockChangesMap, getCurrentFight, getDuration, getDurationLimit, getEnded, getFights, getKit, getMaxBlockChanges, getStarted, getStatistics, getStatistics, getStatistics, handleDisappear, isBed1Broken, isBed2Broken, isInFight, sendSpectatorMessages, sendSpectatorMessages, setBed1Broken, setBed2Broken, setCurrentFight, setKit, setMaxBlockChanges, setStartedAfterCountdownclone, 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, playersAreOpponents, saveFight, setKit, setStartedAfterCountdownpublic BotDuel(StrikePractice plugin,
java.lang.String p1,
BattleKit kit)
public boolean canStart()
Fightpublic void start()
Fightstart in interface Fightstart in class AbstractFightpublic void handleDeath(Player p)
FighthandleDeath in interface Fightp - player who died.public void handleBotDeath(Metadatable metadatable)
BotFighthandleBotDeath in interface BotFightmetadatable - The Metadatable object representing the deceased bot.public boolean allowSpectating()
FightallowSpectating in interface Fightpublic boolean hasEnded()
public void setArena(Arena arena)
setArena in interface FightsetArena in class AbstractFightarena - the new arena.public void setBestOf(BestOf bestOf)
setBestOf in interface BestOfFightpublic BestOf getBestOf()
getBestOf in interface BestOfFightpublic boolean isBreakTime()
BestOfFightisBreakTime in interface BestOfFightpublic java.lang.String getP1()
public java.lang.String getBotName()
public PracticeBot getP2()
public java.lang.String difficulty()
BotFightdifficulty in interface BotFightpublic CitizensNPC.Difficulty getDifficulty()
BotFightgetDifficulty in interface BotFightpublic void setDifficulty(java.lang.String difficulty)
BotFightsetDifficulty in interface BotFightdifficulty - The difficulty of the fight as a string.public FightRecorder getRecorder()
getRecorder in interface Recordablepublic java.util.List<java.lang.String> getTeammates(Player p)
FightgetTeammates in interface Fightpublic java.util.List<java.lang.String> getOpponents(Player p)
FightgetOpponents in interface Fightpublic boolean playersAreTeammates(Player one,
Player two)
playersAreTeammates in interface Fightpublic java.util.Collection<PracticeBot> getBots()
BotFight