public class MinigameTipToe extends java.lang.Object implements ArcadeMinigame
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<org.bukkit.block.Block,java.util.List<org.bukkit.block.Block>> |
blockFakeTileMap
A map of fake tiles, indexed by their blocks.
|
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 |
|---|
MinigameTipToe() |
| Modifier and Type | Method and Description |
|---|---|
void |
createTile(org.bukkit.Location cornerLocation,
boolean isFake,
boolean isAlternate)
Creates a 3x3 block tile.
|
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 |
handleMoveEvent(org.bukkit.event.player.PlayerMoveEvent event)
Handles the given move event, that occured in the minigame.
|
void |
makeTileFall(java.util.List<org.bukkit.block.Block> tileBlocks)
Makes the given tile fall down and removes it from the map.
|
void |
startGame(java.util.List<org.bukkit.entity.Player> players)
Starts a new game.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleAnimationEvent, handleDamageEvent, handleDeathEvent, handleInteractEvent, handleProjectileHitEvent, handleQuitEvent, handleStartEvent, handleTickprivate java.util.Map<org.bukkit.block.Block,java.util.List<org.bukkit.block.Block>> blockFakeTileMap
private java.util.List<org.bukkit.entity.Player> finishedPlayers
private int maxWinningPlayers
public java.lang.String getName()
getName in interface ArcadeMinigamepublic java.util.List<java.lang.String> getDescription()
getDescription in interface ArcadeMinigamepublic void startGame(java.util.List<org.bukkit.entity.Player> players)
startGame in interface ArcadeMinigameplayers - The players who participate.public java.util.List<org.bukkit.entity.Player> endGame()
endGame in interface ArcadeMinigamepublic void handleMoveEvent(org.bukkit.event.player.PlayerMoveEvent event)
handleMoveEvent in interface ArcadeMinigameevent - The move event.public void createTile(org.bukkit.Location cornerLocation,
boolean isFake,
boolean isAlternate)
cornerLocation - The location of the tile block with the lowest coordinates.isFake - If the tile should fall when touched.isAlternate - If the tile should have an alternative color.public void makeTileFall(java.util.List<org.bukkit.block.Block> tileBlocks)
tileBlocks - The blocks forming the tile.