Class WaterSpringSource

All Implemented Interfaces:
UseListener, Killer, Cloneable, Iterable<String>, Serializable

public class WaterSpringSource extends PlayerActivityEntity
A water spring source is a spot where a player can fill an empty flask with spring water. Filling an empty flask takes 10 seconds + randomized 4 seconds; during this time, the player keep standing next to the water spring.
Author:
Vanessa Julius (based on WellSource by kymara)
  • Constructor Details

    • WaterSpringSource

      public WaterSpringSource()
      Create a water spring source.
  • Method Details

    • getName

      public String getName()
      source name.
      Specified by:
      getName in interface Killer
      Overrides:
      getName in class Entity
      Returns:
      name
    • generateRPClass

      public static void generateRPClass()
    • getDuration

      protected int getDuration()
      Get the time it takes to perform this activity.
      Specified by:
      getDuration in class PlayerActivityEntity
      Returns:
      The time to perform the activity (in seconds).
    • isPrepared

      protected boolean isPrepared(Player player)
      Decides if the activity can be done.
      Specified by:
      isPrepared in class PlayerActivityEntity
      Parameters:
      player - for whom to perform the activity
      Returns:
      true if successful.
    • isSuccessful

      protected boolean isSuccessful(Player player)
      Decides if the activity was successful.
      Specified by:
      isSuccessful in class PlayerActivityEntity
      Parameters:
      player - for whom to perform the activity
      Returns:
      true if successful.
    • onFinished

      protected void onFinished(Player player, boolean successful)
      Called when the activity has finished.
      Specified by:
      onFinished in class PlayerActivityEntity
      Parameters:
      player - The player that did the activity.
      successful - If the activity was successful.
    • onStarted

      protected void onStarted(Player player)
      Called when the activity has started.
      Specified by:
      onStarted in class PlayerActivityEntity
      Parameters:
      player - The player starting the activity.