Class UpgradeStorage
java.lang.Object
org.screamingsandals.bedwars.api.upgrades.UpgradeStorage
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addUpgrade
(Game<?, ?, ?, ?, ?, ?, ?, ?, ?> game, Upgrade upgrade) Register active upgrade in gamefindItemSpawnerUpgrades
(Game<?, ?, ?, ?, ?, ?, ?, ?, ?> game, String spawnerInstanceName) findItemSpawnerUpgrades
(Game<?, ?, ?, ?, ?, ?, ?, ?, ?> game, Team<?, ?, ?, ?, ?> team) findItemSpawnerUpgrades
(Game<?, ?, ?, ?, ?, ?, ?, ?, ?> game, Team<?, ?, ?, ?, ?> team, ItemSpawnerType<?, ?, ?> itemSpawnerType) findUpgradeByName
(Game<?, ?, ?, ?, ?, ?, ?, ?, ?> game, String instanceName) Deprecated.getAllUpgradesOfGame
(Game<?, ?, ?, ?, ?, ?, ?, ?, ?> game) Get all upgrades of this type that is registered in game as activeboolean
isUpgradeRegistered
(Game<?, ?, ?, ?, ?, ?, ?, ?, ?> game, Upgrade upgrade) void
removeUpgrade
(Game<?, ?, ?, ?, ?, ?, ?, ?, ?> game, Upgrade upgrade) Unregister active upgradevoid
resetUpgradesForGame
(Game<?, ?, ?, ?, ?, ?, ?, ?, ?> game) This is automatically used while game is ending
-
Method Details
-
getUpgradeName
- Returns:
- upgrade name
-
getUpgradeClass
- Returns:
- upgrade class type
-
addUpgrade
Register active upgrade in game- Parameters:
game
- Gameupgrade
- Upgrade
-
removeUpgrade
Unregister active upgrade- Parameters:
game
- Gameupgrade
- Upgrade
-
isUpgradeRegistered
- Parameters:
game
- Gameupgrade
- Upgrade- Returns:
- true if upgrade is registered
-
resetUpgradesForGame
This is automatically used while game is ending- Parameters:
game
- Game
-
getAllUpgradesOfGame
Get all upgrades of this type that is registered in game as active- Parameters:
game
- Game- Returns:
- ĺist of registered upgrades of game
-
findUpgradeByName
@Deprecated public List<Upgrade> findUpgradeByName(Game<?, ?, ?, ?, ?, ?, ?, ?, ?> game, String instanceName) Deprecated.Find active upgrades with this instanceName- Parameters:
game
- GameinstanceName
- name of spawner- Returns:
- list of upgrades with same name
-
findItemSpawnerUpgrades
-
findItemSpawnerUpgrades
-
findItemSpawnerUpgrades
public List<Upgrade> findItemSpawnerUpgrades(Game<?, ?, ?, ?, ?, ?, ?, ?, ?> game, Team<?, ?, ?, ?, ?> team, ItemSpawnerType<?, ?, ?> itemSpawnerType)
-