Class ScenariosManager

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

public class ScenariosManager extends Object
  • Constructor Details

    • ScenariosManager

      public ScenariosManager()
  • Method Details

    • registerScenario

      public void registerScenario(boolean enabled, com.cryptomorin.xseries.XMaterial material, String name, String... description)
      Register a scenario in FateUHC.
      Parameters:
      enabled - Should the scenario be enabled?
      material - What material should be used?
      name - What should the scenario be called?
      description - What is the description of the scenario?
    • registerScenario

      public void registerScenario(boolean enabled, com.cryptomorin.xseries.XMaterial material, boolean lobbyModeOnlyEdit, String name, String... description)
      Register a scenario in FateUHC.
      Parameters:
      enabled - Should the scenario be enabled?
      material - What material should be used?
      lobbyModeOnlyEdit - Should the scenario only be able to be enabled in the lobby?
      name - What should the scenario be called?
      description - What is the description of the scenario?
    • registerScenario

      public void registerScenario(boolean enabled, org.bukkit.Material material, String alias, String name, String... description)
      Register a scenario in FateUHC.
      Parameters:
      enabled - Should the scenario be enabled?
      material - What Material should be used?
      name - What should the scenario be called?
      description - What is the description of the scenario?
    • registerScenario

      public void registerScenario(boolean enabled, org.bukkit.Material material, boolean lobbyModeOnlyEdit, String alias, String name, String... description)
      Register a scenario in FateUHC.
      Parameters:
      enabled - Should the scenario be enabled?
      material - What Material should be used?
      lobbyModeOnlyEdit - Should the scenario only be able to be enabled in the lobby?
      name - What should the scenario be called?
      description - What is the description of the scenario?
    • getByName

      public Scenario getByName(String name)
      Used to get a Scenario from a scenario name.
      Parameters:
      name - Scenario name (case sensitive)
      Returns:
      Scenario
    • getScenario

      @Deprecated public Scenario getScenario(Scenario source)
      Used to get a scenario from source.
      Parameters:
      source - Scenario
      Returns:
      Scenario
    • getByScenario

      public ScenarioData getByScenario(Scenario source)
      Used to get a scenario from source.
      Parameters:
      source - Scenario
      Returns:
      Scenario
    • getByScenarioData

      public ScenarioData getByScenarioData(ScenarioData source)
      Used to get a scenario from source.
      Parameters:
      source - Scenario
      Returns:
      Scenario
    • getEnabledScenarios

      public List<Scenario> getEnabledScenarios()
      Returns:
      Enabled Scenarios
    • getEnabledScenariosNames

      public List<String> getEnabledScenariosNames()
      Returns:
      Enabled scenario names
    • getNoMolesPlayers

      public List<org.bukkit.entity.Player> getNoMolesPlayers()
      Used to get a list of people who are not moles during the Moles scenario.
      Returns:
      List of non-moles players during Moles scenario
    • getMolesPlayers

      public List<org.bukkit.entity.Player> getMolesPlayers()
      Used to list moles during moles scenario.
      Returns:
      List of moles during Moles scenario
    • isMole

      public boolean isMole(UUID uuid)
      Used to check a player's moles status during Moles scenario.
      Parameters:
      uuid - Player's UUID
      Returns:
      True/False depending on player's status
    • setMole

      public void setMole(UUID uuid)
      Used to set a player as a mole during Moles scenario.
      Parameters:
      uuid - Player's UUID
    • removeMole

      public void removeMole(UUID uuid)
      Used to remove a player from being a mole during Moles scenario.
      Parameters:
      uuid - Player's UUID
    • giveBuildUHCScenario

      public void giveBuildUHCScenario(org.bukkit.entity.Player player)
      Used to give a player the BuildUHC scenario.
      Parameters:
      player - Player's name
    • handleLobbyScenarios

      public void handleLobbyScenarios(org.bukkit.entity.Player player)
      Used to handle scenarios that can only be enabled before users are scattered.
      Parameters:
      player - Player's name
    • handleCorona

      public void handleCorona()
      Used to give the Corona scenario effects to all players.
    • handleLuckyRoulette

      public void handleLuckyRoulette(org.bukkit.entity.Player player)
      Used to start LuckyRoulette for a player.
      Parameters:
      player - Player's name
    • handleScenarios

      public void handleScenarios(org.bukkit.entity.Player player)
      Used to handle scenarios on scatter. This is where most scenarios are setup.
      Parameters:
      player - Player's name
    • getItemStack

      public org.bukkit.inventory.ItemStack getItemStack(String scenario)
      Get the item stack of a scenario.
      Parameters:
      scenario - The scenario you wish to get the item stack for.
      Returns:
      Scenario item ItemStack
    • isActive

      public boolean isActive(String scenario)
      Check if the scenario is active.
      Parameters:
      scenario - The scenario you wish to check if its active.
      Returns:
      boolean
    • isEnabled

      public boolean isEnabled(String scenario)
      Check if the scenario is enabled.
      Parameters:
      scenario - The scenario you wish to check if its enabled.
      Returns:
      boolean
    • getXMaterial

      public com.cryptomorin.xseries.XMaterial getXMaterial(String scenario)
      Get the XMaterial of the scenario.
      Parameters:
      scenario - The scenario you wish to get the XMaterial for.
      Returns:
      XMaterial
    • getMaterial

      public org.bukkit.Material getMaterial(String scenario)
      Get the Material of the scenario.
      Parameters:
      scenario - The scenario you wish to get the Material for.
      Returns:
      Material