1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2026-02-01 07:22:51 +00:00

Completed documentation

Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
2011-05-14 13:27:28 -03:00
parent e9c6f1b027
commit 4b9d52e724
56 changed files with 716 additions and 26 deletions

View File

@@ -3,6 +3,14 @@ package com.l2jserver.model.world.player;
import com.l2jserver.model.world.Player;
import com.l2jserver.model.world.actor.ActorEvent;
/**
* Base event for {@link Player} objects
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public interface PlayerEvent extends ActorEvent {
/**
* @return the player
*/
Player getPlayer();
}

View File

@@ -5,6 +5,11 @@ import com.l2jserver.model.world.actor.ActorListener;
import com.l2jserver.model.world.event.WorldEvent;
import com.l2jserver.model.world.event.WorldListener;
/**
* Listener for {@link PlayerEvent}
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public abstract class PlayerListener implements ActorListener {
@Override
public boolean dispatch(ActorEvent e) {

View File

@@ -7,10 +7,29 @@ import com.l2jserver.model.world.capability.Spawnable;
import com.l2jserver.model.world.event.SpawnEvent;
import com.l2jserver.util.Coordinate;
/**
* Event dispatcher once an player has spawned in the world
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public class PlayerSpawnEvent implements PlayerEvent, SpawnEvent {
/**
* The spawned player
*/
private final Player player;
/**
* The spawning coordinate
*/
private final Coordinate coordinate;
/**
* Creates a new instance
*
* @param player
* the spawned player
* @param coordinate
* the spawn coordinate
*/
public PlayerSpawnEvent(Player player, Coordinate coordinate) {
this.player = player;
this.coordinate = coordinate;

View File

@@ -3,7 +3,20 @@ package com.l2jserver.model.world.player;
import com.l2jserver.model.world.Player;
import com.l2jserver.util.Coordinate;
/**
* Event dispatched once an player is teleported.
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public class PlayerTeleportEvent extends PlayerSpawnEvent {
/**
* Creates a new instance
*
* @param player
* the teleported player
* @param coordinate
* the coordinate
*/
public PlayerTeleportEvent(Player player, Coordinate coordinate) {
super(player, coordinate);
}

View File

@@ -1,6 +0,0 @@
package com.l2jserver.model.world.player;
import com.l2jserver.model.world.event.WorldEvent;
public interface TestEvent extends WorldEvent {
}