wyvern.lib.event
Class MapPlayerAdapter

java.lang.Object
  extended bywyvern.lib.event.MapPlayerAdapter
All Implemented Interfaces:
MapPlayerListener

public class MapPlayerAdapter
extends java.lang.Object
implements MapPlayerListener

Adapter class you can use if you're only interested in a specific type of MapPlayerEvent (entered, moved, left). You can have your class extend this class and override the appropriate method. If your class already extends some other class, you can create a helper class that extends MapPlayerAdapter, and have its methods call methods in your main class.

Version:
1.0, Sep 8, 2003
Author:
Steve Yegge

Constructor Summary
MapPlayerAdapter()
           
 
Method Summary
 void playerEntered(MapPlayerEvent event)
          Player entered the map.
 void playerEvent(MapPlayerEvent event)
          Notification that a MapPlayerEvent has occurred.
 void playerLeft(MapPlayerEvent event)
          Player left the map.
 void playerMoved(MapPlayerEvent event)
          Player moved in the map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapPlayerAdapter

public MapPlayerAdapter()
Method Detail

playerEvent

public void playerEvent(MapPlayerEvent event)
Notification that a MapPlayerEvent has occurred.

There's no need for you to override this method - if you do, you'll get called for every type of MapPlayerEvent, which defeats the purpose of using an adapter. You'd be better off just implementing MapPlayerListener.

Specified by:
playerEvent in interface MapPlayerListener

playerEntered

public void playerEntered(MapPlayerEvent event)
Player entered the map.

Parameters:
event - the MapPlayerEvent

playerLeft

public void playerLeft(MapPlayerEvent event)
Player left the map.

Parameters:
event - the MapPlayerEvent

playerMoved

public void playerMoved(MapPlayerEvent event)
Player moved in the map.

Parameters:
event - the MapPlayerEvent