Class CorporationAwardAchievementEvent

All Implemented Interfaces:
Cancellable

public class CorporationAwardAchievementEvent extends CorporationExperienceChangeEvent
Called before a Corporation earns an achievement.
  • Constructor Details

    • CorporationAwardAchievementEvent

      public CorporationAwardAchievementEvent(@NotNull @NotNull Corporation c, @NotNull @NotNull CorporationAchievement achievement, int oldLevel, int newLevel)
      Constructs a CorporationAwardAchievementEvent.
      Parameters:
      c - The Corporation earning the achievement
      achievement - The achievement being earned
      oldLevel - The Corporation's level before earning the achievement
      newLevel - The Corporation's level after earning the achievement
  • Method Details

    • getAchievement

      @NotNull public @NotNull CorporationAchievement getAchievement()
      Gets the achievement being earned.
      Returns:
      Achievement being earned
    • getOldLevel

      public int getOldLevel()
      Gets the Corporation's level before earning the achievement.
      Returns:
      Corporation's level before earning the achievement
    • getNewLevel

      public int getNewLevel()
      Gets the Corporation's level after earning the achievement.
      Returns:
      Corporation's level after earning the achievement
    • setNewLevel

      public void setNewLevel(int newLevel) throws IllegalArgumentException
      Sets the Corporation's level after earning the achievement.
      Parameters:
      newLevel - Corporation's level after earning the achievement
      Throws:
      IllegalArgumentException - if newLevel is greater than the achievement's max level, or is negative
    • setNewExperience

      @Deprecated public final void setNewExperience(double newExperience)
      Deprecated.
      Description copied from class: CorporationExperienceChangeEvent
      Sets the Corporation's Experience after the change.
      Overrides:
      setNewExperience in class CorporationExperienceChangeEvent
      Parameters:
      newExperience - Corporation's Experience after the change