Class GlobalModifier
java.lang.Object
de.Keyle.MyPet.api.skill.experience.modifier.ExperienceModifier
de.Keyle.MyPet.api.skill.experience.modifier.GlobalModifier
An experience modifier that multiplies incoming experience by the server-wide global factor.
The multiplier is read from MyPetGlobal.LevelSystem.Experience.Modifier.GLOBAL at each invocation, so changes to
the configuration value take effect immediately without re-registering this modifier.
A global factor of 1.0 means no change; 2.0 doubles all experience;
0.5 halves it.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a modifier that reads the server-wide experience factor. -
Method Summary
Modifier and TypeMethodDescriptiondoublemodify(double experience, double baseExperience) Applies this modifier to the given experience value.
-
Constructor Details
-
GlobalModifier
public GlobalModifier()Creates a modifier that reads the server-wide experience factor.
-
-
Method Details
-
modify
public double modify(double experience, double baseExperience) Applies this modifier to the given experience value. Scales the experience by the global multiplier from configuration.- Specified by:
modifyin classExperienceModifier- Parameters:
experience- the experience value as modified by prior modifiers in the chainbaseExperience- the original unmodified experience from the mob kill- Returns:
- the modified experience value to pass to the next modifier (or to award)
-