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

public class WellSource extends PlayerActivityEntity
A well source is a spot where a player can make a wish to gain an item. He needs time and luck. Wishing takes 10 seconds + randomized 4 seconds; during this time, the player keep standing next to the well source. At every well are two sources next to each other, so the player can actually make 2 wishes at once.
Author:
kymara (based on FishSource by daniel)
  • Constructor Details

    • WellSource

      public WellSource()
      Create a wishing well 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.