public class Upgrades
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Upgrades.Upgrade |
static class |
Upgrades.UpgradeEventType |
| Constructor and Description |
|---|
Upgrades() |
| Modifier and Type | Method and Description |
|---|---|
static Upgrades.Upgrade |
getUpgrade(java.lang.String upgradeId)
Get or create the unique upgrade instance
|
static Upgrades.Upgrade |
getUpgrade(java.lang.String upgradeId,
int tier)
Get or create the unique upgrade instance
|
static Upgrades.UpgradeEventType |
newUpgradeEventType() |
static <T extends IUpgradable<T,O>,O> |
sendEvent(T upgradable,
IUpgradeSensitiveEvent<O> event)
Send an upgrade sensitive event over the event bus for all upgrades the upgradable has.
|
static <T extends IUpgradable<T,O>,O> |
sendEvent(T upgradable,
IUpgradeSensitiveEvent<O> event,
java.util.Collection<Upgrades.Upgrade> upgrades)
Send an upgrade sensitive event over the event bus.
|
static <T extends IUpgradable<T,O>,O> |
sendEvent(T upgradable,
IUpgradeSensitiveEvent<O> event,
Upgrades.Upgrade... upgrades)
Send an upgrade sensitive event over the event bus.
|
static <T extends IUpgradable<T,O>,O> |
sendEvent(T upgradable,
IUpgradeSensitiveEvent<O> event,
Upgrades.Upgrade upgrade)
Send an upgrade sensitive event over the event bus.
|
public static Upgrades.Upgrade getUpgrade(java.lang.String upgradeId, int tier)
upgradeId - The unique id of the upgrade.tier - the upgrade tier.public static Upgrades.Upgrade getUpgrade(java.lang.String upgradeId)
upgradeId - The unique id of the upgrade.public static Upgrades.UpgradeEventType newUpgradeEventType()
public static <T extends IUpgradable<T,O>,O> void sendEvent(T upgradable, IUpgradeSensitiveEvent<O> event)
T - The type of upgradable.O - The type of event variable type.upgradable - The upgradable instance.event - The event.public static <T extends IUpgradable<T,O>,O> void sendEvent(T upgradable, IUpgradeSensitiveEvent<O> event, Upgrades.Upgrade upgrade)
T - The type of upgradable.O - The type of event variable type.upgradable - The upgradable instance.event - The event.upgrade - The types of upgrade this event should be sent to.public static <T extends IUpgradable<T,O>,O> void sendEvent(T upgradable, IUpgradeSensitiveEvent<O> event, Upgrades.Upgrade... upgrades)
T - The type of upgradable.O - The type of event variable type.upgradable - The upgradable instance.event - The event.upgrades - The types of upgrades this event should be sent to.public static <T extends IUpgradable<T,O>,O> void sendEvent(T upgradable, IUpgradeSensitiveEvent<O> event, java.util.Collection<Upgrades.Upgrade> upgrades)
T - The type of upgradable.O - The type of event variable type.upgradable - The upgradable instance.event - The event.upgrades - The types of upgrades this event should be sent to.