Package org.kikikan.deadbymoonlight.game
Class Game
- java.lang.Object
-
- org.kikikan.deadbymoonlight.game.Game
-
public final class Game extends java.lang.Object
Represents the Game a.k.a the Trial itself.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
announce(java.lang.String message)
Sends a message to every Player of the Game with the DbM prefix.boolean
equals(java.lang.Object obj)
AuraManager
getAuraManager()
Gets the Aura Manager for this Game.org.bukkit.scoreboard.Scoreboard
getBoard()
Gets the scoreboard that contains the number of remaining Generators.boolean
getIsInProgress()
Checks if this Game is currently in progress.java.util.List<Item>
getItems()
Gets a copy of the usable items of this game.java.util.Optional<org.bukkit.Location>
getLobby()
Gets the location of the Lobby.java.lang.String
getName()
Gets the name of the Minecraft world this Arena is in.PlayerManager
getPlayerManager()
Gets the Player Manager of this Game.World
getWorld()
java.util.Optional<WorldManager>
getWorldManager()
Gets the World Manager of this Game.boolean
isBeingEdited()
Gets thebeingEdited
field.boolean
isFull()
checks if the Game is full.void
runEvent(Event event)
Runs the Event specified if the game is in progress.
-
-
-
Constructor Detail
-
Game
public Game(org.kikikan.deadbymoonlight.DeadByMoonlight plugin, World world)
-
-
Method Detail
-
announce
public void announce(java.lang.String message)
Sends a message to every Player of the Game with the DbM prefix.- Parameters:
message
- The message to send.
-
runEvent
public void runEvent(Event event)
Runs the Event specified if the game is in progress. The order is as follows:
1 - GameComponents
2 - Players
3 - Survivors' Items
The order in these two categories is determined by the priority of the EventHandler annotations on the methods.- Parameters:
event
- The Event that will be fired.
-
getName
public java.lang.String getName()
Gets the name of the Minecraft world this Arena is in.- Returns:
- The name of the Minecraft world.
-
getLobby
public java.util.Optional<org.bukkit.Location> getLobby()
Gets the location of the Lobby.- Returns:
- The location of the Lobby.
-
getItems
public java.util.List<Item> getItems()
Gets a copy of the usable items of this game.- Returns:
- A copy of the usable items' list.
-
getPlayerManager
public PlayerManager getPlayerManager()
Gets the Player Manager of this Game.- Returns:
- The Player Manager.
-
getWorldManager
public java.util.Optional<WorldManager> getWorldManager()
Gets the World Manager of this Game.- Returns:
- The World Manager.
-
getAuraManager
public AuraManager getAuraManager()
Gets the Aura Manager for this Game.- Returns:
- The Aura Manager.
-
getIsInProgress
public boolean getIsInProgress()
Checks if this Game is currently in progress.- Returns:
- True if the Game is in progress.
-
getBoard
public org.bukkit.scoreboard.Scoreboard getBoard()
Gets the scoreboard that contains the number of remaining Generators.- Returns:
- The scoreboard.
-
isBeingEdited
public boolean isBeingEdited()
Gets thebeingEdited
field.- Returns:
- True if the World of the Game is being edited.
-
isFull
public boolean isFull()
checks if the Game is full.- Returns:
- True if the Game is full.
-
getWorld
public World getWorld()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-