public class PartyVsBots extends AbstractFight implements BotFight, PartyFight
arena, bed1Broken, bed2Broken, blockChanges, blockLimitReached, currentFight, durationLimit, kit, maxBlockChanges, 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() |
java.util.Collection<PracticeBot> |
getBots()
Gets a collection of practice bots participating in the fight.
|
java.util.HashSet<PracticeBot> |
getBotsAlive() |
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.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.
|
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, setArena, 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, playersAreTeammates, saveFight, setArena, setKit, setStartedAfterCountdown
public void start()
Fight
start
in interface Fight
start
in class AbstractFight
public Party[] getParties()
getParties
in interface PartyFight
public boolean allowSpectating()
Fight
allowSpectating
in interface Fight
public boolean hasEnded()
public boolean canStart()
Fight
public void handleDeath(Player p)
Fight
handleDeath
in interface Fight
p
- player who died.@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)
Fight
getTeammates
in interface Fight
public java.util.List<java.lang.String> getOpponents(Player p)
getOpponents
in interface Fight
public java.util.Set<PracticeBot> getAliveBots()
public CitizensNPC.Difficulty getDifficulty()
BotFight
getDifficulty
in interface BotFight
public java.lang.String difficulty()
BotFight
difficulty
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 void handleBotDeath(Metadatable ent)
BotFight
handleBotDeath
in interface BotFight
ent
- The Metadatable object representing the deceased bot.public java.util.Collection<PracticeBot> getBots()
BotFight