public class MinigameDoorDash extends java.lang.Object implements ArcadeMinigame
Modifier and Type | Field and Description |
---|---|
private java.util.List<org.bukkit.block.Block> |
breakingBlocks
A list of blocks that break when hit.
|
private java.util.List<org.bukkit.block.Block> |
fakeBlocks
A list of blocks that don't break when hit.
|
private java.util.List<org.bukkit.entity.Player> |
finishedPlayers
The players who have crossed the finish line.
|
private int |
maxWinningPlayers
The amount of players who can win the game.
|
Constructor and Description |
---|
MinigameDoorDash() |
Modifier and Type | Method and Description |
---|---|
void |
createDoors(int z,
int realDoors,
boolean isThin)
Creates a row of 5 doors at the given z coordinate.
|
java.util.List<org.bukkit.entity.Player> |
endGame()
Ends the game and decides a winner.
|
java.util.List<java.lang.String> |
getDescription() |
java.lang.String |
getName() |
void |
handleAnimationEvent(org.bukkit.event.player.PlayerAnimationEvent event)
Handles the given animation event, that occured in the minigame.
|
void |
handleMoveEvent(org.bukkit.event.player.PlayerMoveEvent event)
Handles the given move event, that occured in the minigame.
|
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
handleDamageEvent, handleDeathEvent, handleInteractEvent, handleProjectileHitEvent, handleQuitEvent, handleStartEvent, handleTick
private java.util.List<org.bukkit.block.Block> breakingBlocks
private java.util.List<org.bukkit.block.Block> fakeBlocks
private java.util.List<org.bukkit.entity.Player> finishedPlayers
private int maxWinningPlayers
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 handleAnimationEvent(org.bukkit.event.player.PlayerAnimationEvent event)
handleAnimationEvent
in interface ArcadeMinigame
event
- The animation event.public void handleMoveEvent(org.bukkit.event.player.PlayerMoveEvent event)
handleMoveEvent
in interface ArcadeMinigame
event
- The move event.public void createDoors(int z, int realDoors, boolean isThin)
z
- The z coordinate to create the doors at.realDoors
- How many doors should be real.isThin
- If the doors should be 1 instead of 3 blocks high.