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, setStartedAfterCountdown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setDifficulty
addBlockChange, clearBlockChanges, forceEndDelayed, getArena, getBlockChanges, getBlockChangesMap, getDuration, getDurationLimit, getEnded, getFightStatistics, getFightStatistics, getKit, getPlayerNames, getPlayersInFight, getSpectators, getStarted, getStatistics, getStatistics, getStatistics, hasStarted, playersAreOpponents, saveFight, setKit, setStartedAfterCountdown
public BotDuel(StrikePractice plugin, java.lang.String p1, BattleKit kit)
public boolean canStart()
Fight
public void start()
Fight
start
in interface Fight
start
in class AbstractFight
public void handleDeath(Player p)
Fight
handleDeath
in interface Fight
p
- player who died.public void handleBotDeath(Metadatable metadatable)
BotFight
handleBotDeath
in interface BotFight
metadatable
- The Metadatable object representing the deceased bot.public boolean allowSpectating()
Fight
allowSpectating
in interface Fight
public boolean hasEnded()
public void setArena(Arena arena)
setArena
in interface Fight
setArena
in class AbstractFight
arena
- the new arena.public void setBestOf(BestOf bestOf)
setBestOf
in interface BestOfFight
public BestOf getBestOf()
getBestOf
in interface BestOfFight
public boolean isBreakTime()
BestOfFight
isBreakTime
in interface BestOfFight
public java.lang.String getP1()
public java.lang.String getBotName()
public PracticeBot getP2()
public java.lang.String difficulty()
BotFight
difficulty
in interface BotFight
public CitizensNPC.Difficulty getDifficulty()
BotFight
getDifficulty
in interface BotFight
public void setDifficulty(java.lang.String difficulty)
BotFight
setDifficulty
in interface BotFight
difficulty
- The difficulty of the fight as a string.public FightRecorder getRecorder()
getRecorder
in interface Recordable
public java.util.List<java.lang.String> getTeammates(Player p)
Fight
getTeammates
in interface Fight
public java.util.List<java.lang.String> getOpponents(Player p)
Fight
getOpponents
in interface Fight
public boolean playersAreTeammates(Player one, Player two)
playersAreTeammates
in interface Fight
public java.util.Collection<PracticeBot> getBots()
BotFight