Class TeleportNotifier

java.lang.Object
games.stendhal.server.core.events.TeleportNotifier

public final class TeleportNotifier extends Object
Other classes can register here to be notified on teleports
Author:
hendrik
  • Method Details

    • get

      public static TeleportNotifier get()
      Return the TeleportNotifier instance.
      Returns:
      TeleportNotifier the Singleton instance
    • notify

      public void notify(Player player, boolean playerAction)
      notifies about a teleport
      Parameters:
      player - player who teleported
      playerAction - true, if the player actively teleported; false for all teleports
    • registerListener

      public void registerListener(TeleportListener listener)
      registers a TeleportListener.
      Parameters:
      listener - TeleportListener
    • unregisterListener

      public void unregisterListener(TeleportListener listener)
      unregisters a TeleportListener so that it will not be called anymore.
      Parameters:
      listener - TeleportListener