Interface SpawnerDurationModifier
public interface SpawnerDurationModifier
Spawner
s have a specific period/duration until they drop something.
Use this class to modify the duration that'll be used.
Initiate it using Spawner.addDropDurationModifier(String, Plugin, Operation, double)
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Enumerable operation to be applied to the mathematical equation -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The "base" modifier that usedSpawnerDurationModifier.Operation.SET
and the valueDropType.getDropDuration()
by defaultstatic final String
Gets added when a player purchases an upgrade -
Method Summary
Modifier and TypeMethodDescriptiongetId()
Returns the id of this modifier that can be used to identify this modifierGet the operation this modifier will apply to the mathematical equation.Returns the plugin that created this modifierReturns the spawner to which this modifier has been added todouble
getValue()
Get the amount in seconds by which this modifier will apply itsSpawnerDurationModifier.Operation
.boolean
Returns whether or not this modifier still exists ingetSpawner()
void
setValue
(double value) Set the amount in seconds by which this modifier will apply itsSpawnerDurationModifier.Operation
.
-
Field Details
-
ID_DEFAULT_BASE
The "base" modifier that usedSpawnerDurationModifier.Operation.SET
and the valueDropType.getDropDuration()
by default- See Also:
-
ID_DEFAULT_UPGRADEDEALER
Gets added when a player purchases an upgrade- See Also:
-
-
Method Details
-
getId
String getId()Returns the id of this modifier that can be used to identify this modifier- Returns:
- The id of this modifier
-
getPlugin
Plugin getPlugin()Returns the plugin that created this modifier- Returns:
- The plugin that initiated this modifier
-
getSpawner
Spawner getSpawner()Returns the spawner to which this modifier has been added to- Returns:
- The spawner to which this applies to
-
getOperation
SpawnerDurationModifier.Operation getOperation()Get the operation this modifier will apply to the mathematical equation.- Returns:
- The operation used
-
getValue
double getValue()Get the amount in seconds by which this modifier will apply itsSpawnerDurationModifier.Operation
.- Returns:
- The value that will be used in the mathematical equation
-
setValue
void setValue(double value) Set the amount in seconds by which this modifier will apply itsSpawnerDurationModifier.Operation
.- Parameters:
value
- The new value that will be used in the mathematical equation
-
isPresent
boolean isPresent()Returns whether or not this modifier still exists ingetSpawner()
- Returns:
- If this modifier is still present
-