public class MinigameJinxed extends java.lang.Object implements ArcadeMinigame
Modifier and Type | Field and Description |
---|---|
private org.bukkit.boss.BossBar |
jinxedBar
The boss bar, visible for jinxed players.
|
private SkillParticle |
jinxedParticle
The particles to show around jinxed players.
|
Constructor and Description |
---|
MinigameJinxed()
Creates a new instance of the minigame.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<org.bukkit.entity.Player> |
endGame()
Ends the game and decides a winner.
|
java.util.List<java.lang.String> |
getDescription() |
int |
getJinxedCount(java.util.List<org.bukkit.entity.Player> team)
Gets the amount of jinxed players in a team.
|
java.lang.String |
getName() |
void |
handleDamageEvent(org.bukkit.event.entity.EntityDamageEvent event)
Handles the given damage event, that occured in the minigame.
|
void |
handleQuitEvent(org.bukkit.entity.Player player)
Handles the given quit event, that occured in the minigame.
|
void |
handleTick()
A method that is called every second of the minigame.
|
boolean |
isJinxed(org.bukkit.entity.Player player)
Checks if a player is jinxed.
|
boolean |
jinx(org.bukkit.entity.Player jinxer,
org.bukkit.entity.Player jinxed)
Tries to jinx a player.
|
void |
jinxPlayers(java.util.List<org.bukkit.entity.Player> players)
Marks the given players as jinxed.
|
void |
startGame(java.util.List<org.bukkit.entity.Player> players)
Starts a new game.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleAnimationEvent, handleDeathEvent, handleInteractEvent, handleMoveEvent, handleProjectileHitEvent, handleStartEvent
private org.bukkit.boss.BossBar jinxedBar
private SkillParticle jinxedParticle
public java.lang.String getName()
getName
in interface ArcadeMinigame
public java.util.List<java.lang.String> getDescription()
getDescription
in interface ArcadeMinigame
public void startGame(java.util.List<org.bukkit.entity.Player> players)
startGame
in interface ArcadeMinigame
players
- The players who participate.public java.util.List<org.bukkit.entity.Player> endGame()
endGame
in interface ArcadeMinigame
public void handleQuitEvent(org.bukkit.entity.Player player)
handleQuitEvent
in interface ArcadeMinigame
player
- The player who quit.public void handleDamageEvent(org.bukkit.event.entity.EntityDamageEvent event)
handleDamageEvent
in interface ArcadeMinigame
event
- The damage event.public void handleTick()
handleTick
in interface ArcadeMinigame
public boolean isJinxed(org.bukkit.entity.Player player)
player
- The player to check.public int getJinxedCount(java.util.List<org.bukkit.entity.Player> team)
team
- The team to check.public boolean jinx(org.bukkit.entity.Player jinxer, org.bukkit.entity.Player jinxed)
jinxer
- The player trying to jinx.jinxed
- The player getting jinxed.public void jinxPlayers(java.util.List<org.bukkit.entity.Player> players)
players
- The players to jinx.