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

public class FishSource extends PlayerActivityEntity
A fish source is a spot where a player can fish. He needs a fishing rod, time and luck. Before he catches fish he needs to make a license. Fishing takes 5-9 seconds; during this time, the player keep standing next to the fish source. In fact, the player only has to be there when the prospecting action has finished. Therefore, make sure that two fish sources are always at least 8 sec of walking away from each other, so that the player can't fish at several sites simultaneously. Completion of the Fishermans Collector quest increases the chance of catching fish. Some karma is used to decide the outcome.
Author:
dine
  • Constructor Details

    • FishSource

      public FishSource(String itemName)
      Create a fish source.
      Parameters:
      itemName - The name of the item to be caught.
  • 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.