Interface BeforeUpdateStaminaListener


public interface BeforeUpdateStaminaListener
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    onBeforeUpdateStamina(String reason, int newStamina, boolean isCharacterStamina)
    onBeforeUpdateStamina() will be called before StaminaManager attempt to update the player's current stamina.
    onBeforeUpdateStamina(String reason, Consumption consumption, boolean isCharacterStamina)
    onBeforeUpdateStamina() will be called before StaminaManager attempt to update the player's current stamina.
  • Method Details

    • onBeforeUpdateStamina

      int onBeforeUpdateStamina(String reason, int newStamina, boolean isCharacterStamina)
      onBeforeUpdateStamina() will be called before StaminaManager attempt to update the player's current stamina. This gives listeners a chance to intercept this update.
      Parameters:
      reason - Why updating stamina.
      newStamina - New ABSOLUTE stamina value.
      Returns:
      true if you want to cancel this update, otherwise false.
    • onBeforeUpdateStamina

      Consumption onBeforeUpdateStamina(String reason, Consumption consumption, boolean isCharacterStamina)
      onBeforeUpdateStamina() will be called before StaminaManager attempt to update the player's current stamina. This gives listeners a chance to intercept this update.
      Parameters:
      reason - Why updating stamina.
      consumption - ConsumptionType and RELATIVE stamina change amount.
      Returns:
      true if you want to cancel this update, otherwise false.