Class RandomDestinationPortal

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

public class RandomDestinationPortal extends QuestCompletedPortal
A portal that sends the using player to a randomly chosen destination. Valid destinations are filtered based on the player's level from a pre-defined list of interesting places.
  • Constructor Details

    • RandomDestinationPortal

      public RandomDestinationPortal()
      Create a new RandomDestinationPortal
  • Method Details

    • onAdded

      public void onAdded(StendhalRPZone zone)
      Description copied from class: Entity
      Called when this object is added to a zone.
      Overrides:
      onAdded in class Entity
      Parameters:
      zone - The zone this was added to.
    • usePortal

      protected boolean usePortal(Player player)
      Use the portal.
      Overrides:
      usePortal in class Portal
      Parameters:
      player - the Player who wants to use this portal
      Returns:
      true if the portal worked, false otherwise.