Package net.fateuhc.plugin.api.managers
Class ScenariosManager
java.lang.Object
net.fateuhc.plugin.api.managers.ScenariosManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionUsed to get a Scenario from a scenario name.getByScenario(Scenario source) Used to get a scenario from source.getByScenarioData(ScenarioData source) Used to get a scenario from source.org.bukkit.inventory.ItemStackgetItemStack(String scenario) Get the item stack of a scenario.org.bukkit.MaterialgetMaterial(String scenario) Get the Material of the scenario.List<org.bukkit.entity.Player>Used to list moles during moles scenario.List<org.bukkit.entity.Player>Used to get a list of people who are not moles during the Moles scenario.getScenario(Scenario source) Deprecated.com.cryptomorin.xseries.XMaterialgetXMaterial(String scenario) Get the XMaterial of the scenario.voidgiveBuildUHCScenario(org.bukkit.entity.Player player) Used to give a player the BuildUHC scenario.voidUsed to give the Corona scenario effects to all players.voidhandleLobbyScenarios(org.bukkit.entity.Player player) Used to handle scenarios that can only be enabled before users are scattered.voidhandleLuckyRoulette(org.bukkit.entity.Player player) Used to start LuckyRoulette for a player.voidhandleScenarios(org.bukkit.entity.Player player) Used to handle scenarios on scatter.booleanCheck if the scenario is active.booleanCheck if the scenario is enabled.booleanUsed to check a player's moles status during Moles scenario.voidregisterScenario(boolean enabled, com.cryptomorin.xseries.XMaterial material, boolean lobbyModeOnlyEdit, String name, String... description) Register a scenario in FateUHC.voidregisterScenario(boolean enabled, com.cryptomorin.xseries.XMaterial material, String name, String... description) Register a scenario in FateUHC.voidregisterScenario(boolean enabled, org.bukkit.Material material, boolean lobbyModeOnlyEdit, String alias, String name, String... description) Register a scenario in FateUHC.voidregisterScenario(boolean enabled, org.bukkit.Material material, String alias, String name, String... description) Register a scenario in FateUHC.voidremoveMole(UUID uuid) Used to remove a player from being a mole during Moles scenario.voidUsed to set a player as a mole during Moles scenario.
-
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- WhatMaterialshould 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- WhatMaterialshould 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
Used to get a Scenario from a scenario name.- Parameters:
name- Scenario name (case sensitive)- Returns:
- Scenario
-
getScenario
Deprecated.UsegetByScenario(Scenario)orgetByScenarioData(ScenarioData)instead.Used to get a scenario from source.- Parameters:
source- Scenario- Returns:
- Scenario
-
getByScenario
Used to get a scenario from source.- Parameters:
source- Scenario- Returns:
- Scenario
-
getByScenarioData
Used to get a scenario from source.- Parameters:
source- Scenario- Returns:
- Scenario
-
getEnabledScenarios
- Returns:
- Enabled Scenarios
-
getEnabledScenariosNames
- Returns:
- Enabled scenario names
-
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
Used to list moles during moles scenario.- Returns:
- List of moles during Moles scenario
-
isMole
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
Used to set a player as a mole during Moles scenario.- Parameters:
uuid- Player's UUID
-
removeMole
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
Get the item stack of a scenario.- Parameters:
scenario- The scenario you wish to get the item stack for.- Returns:
- Scenario item ItemStack
-
isActive
Check if the scenario is active.- Parameters:
scenario- The scenario you wish to check if its active.- Returns:
- boolean
-
isEnabled
Check if the scenario is enabled.- Parameters:
scenario- The scenario you wish to check if its enabled.- Returns:
- boolean
-
getXMaterial
Get the XMaterial of the scenario.- Parameters:
scenario- The scenario you wish to get the XMaterial for.- Returns:
XMaterial
-
getMaterial
Get the Material of the scenario.- Parameters:
scenario- The scenario you wish to get the Material for.- Returns:
Material
-
getByScenario(Scenario)orgetByScenarioData(ScenarioData)instead.