Class GameManager

java.lang.Object
net.fateuhc.plugin.api.managers.GameManager

public class GameManager extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the current state of the UHC game.
    Retrieves the type of the game.
    org.bukkit.inventory.ItemStack
    Retrieves the golden head ItemStack from the UHC GameManager.
    void
    Retrieves the host of the UHC game.
    org.bukkit.Location
    Retrieves the center location of the UHC game.
    void
    Retrieves the winner of the UHC game.
    void
    giveStarterInventory(org.bukkit.entity.Player player)
    Gives the starter inventory to the specified player.
    void
    handleItems(org.bukkit.entity.Player player)
    Handles the items for the specified player.
    void
    handleSpectatorItems(org.bukkit.entity.Player player)
    Handles the spectator items for the specified player.
    boolean
    Checks if the game is currently in progress.
    boolean
    Returns the current status of Player versus Player (PvP) in the UHC game.
    boolean
    Checks if the game is currently running or in the starting state.
    void
    sendOreAlert(org.bukkit.block.Block ore, org.bukkit.entity.Player player, int amount)
    Sends an ore alert to the specified player.
    void
    sendPvPAlert(org.bukkit.entity.Player damager, org.bukkit.entity.Player victim)
    Sends a Player versus Player (PvP) alert to the game manager.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GameManager

      public GameManager()
  • Method Details

    • getUHCCenter

      public org.bukkit.Location getUHCCenter()
      Retrieves the center location of the UHC game.
      Returns:
      The center location of the UHC game.
    • giveStarterInventory

      public void giveStarterInventory(org.bukkit.entity.Player player)
      Gives the starter inventory to the specified player.
      Parameters:
      player - The player to give the starter inventory to.
    • getGameType

      public String getGameType()
      Retrieves the type of the game.
      Returns:
      The type of the game as a string.
    • getGoldenHead

      public org.bukkit.inventory.ItemStack getGoldenHead()
      Retrieves the golden head ItemStack from the UHC GameManager.
      Returns:
      The golden head ItemStack.
    • sendOreAlert

      public void sendOreAlert(org.bukkit.block.Block ore, org.bukkit.entity.Player player, int amount)
      Sends an ore alert to the specified player.
      Parameters:
      ore - The block representing the ore that was mined.
      player - The player who mined the ore.
      amount - The amount of ore that was mined.
    • sendPvPAlert

      public void sendPvPAlert(org.bukkit.entity.Player damager, org.bukkit.entity.Player victim)
      Sends a Player versus Player (PvP) alert to the game manager.
      Parameters:
      damager - The player who attacked another player.
      victim - The player who was attacked.
    • isPVP

      public boolean isPVP()
      Returns the current status of Player versus Player (PvP) in the UHC game.
      Returns:
      true if PvP is enabled, false otherwise.
    • isRunning

      public boolean isRunning()
      Checks if the game is currently running or in the starting state.
      Returns:
      true if the game is running or in the starting state, false otherwise.
    • isGame

      public boolean isGame()
      Checks if the game is currently in progress.
      Returns:
      true if the game is in progress, false otherwise.
    • getGameState

      public GameState getGameState()
      Retrieves the current state of the UHC game.
      Returns:
      The current state of the UHC game as a GameState object.
    • handleItems

      public void handleItems(org.bukkit.entity.Player player)
      Handles the items for the specified player. This method delegates the handling of items to the GameManager class in the UHC instance.
      Parameters:
      player - The player for whom to handle the items.
    • handleSpectatorItems

      public void handleSpectatorItems(org.bukkit.entity.Player player)
      Handles the spectator items for the specified player. This method delegates the handling of items to the GameManager class in the UHC instance.
      Parameters:
      player - The player for whom to handle the spectator items.
    • getHost

      public void getHost()
      Retrieves the host of the UHC game.
    • getWinner

      public void getWinner()
      Retrieves the winner of the UHC game.