mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-11 09:42:54 +00:00
@@ -16,24 +16,15 @@
|
||||
*/
|
||||
package com.l2jserver.model.world.actor.event;
|
||||
|
||||
import com.l2jserver.service.game.world.event.WorldEvent;
|
||||
import com.l2jserver.service.game.world.event.WorldListener;
|
||||
import com.l2jserver.service.game.world.event.FilteredWorldListener;
|
||||
|
||||
/**
|
||||
* This listener will filter to only dispatch {@link ActorEvent} events.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class ActorListener implements WorldListener {
|
||||
@Override
|
||||
public boolean dispatch(WorldEvent e) {
|
||||
if (!(e instanceof ActorEvent))
|
||||
return false;
|
||||
return dispatch((ActorEvent) e);
|
||||
public abstract class ActorListener extends FilteredWorldListener<ActorEvent> {
|
||||
public ActorListener() {
|
||||
super(ActorEvent.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see WorldListener#dispatch(WorldEvent)
|
||||
*/
|
||||
protected abstract boolean dispatch(ActorEvent e);
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@ public enum CharacterClass {
|
||||
0x09, ROGUE),
|
||||
// 3rd classes
|
||||
DUELIST(0x58, GLADIATOR), DREADNOUGHT(0x59, WARLORD), PHOENIX_KNIGHT(0x5a,
|
||||
PALADIN), HELL_KNIGHT(0x5b, DARK_AVENGER), SAGITTARIUS(0x5c, HAWKEYE), ADVENTURER(
|
||||
0x5d, TREASURE_HUNTER),
|
||||
PALADIN), HELL_KNIGHT(0x5b, DARK_AVENGER), SAGITTARIUS(0x5c,
|
||||
HAWKEYE), ADVENTURER(0x5d, TREASURE_HUNTER),
|
||||
|
||||
/**
|
||||
* Human mystic
|
||||
|
||||
@@ -16,24 +16,16 @@
|
||||
*/
|
||||
package com.l2jserver.model.world.character.event;
|
||||
|
||||
import com.l2jserver.service.game.world.event.WorldEvent;
|
||||
import com.l2jserver.service.game.world.event.WorldListener;
|
||||
import com.l2jserver.service.game.world.event.FilteredWorldListener;
|
||||
|
||||
/**
|
||||
* This listener will filter to only dispatch {@link CharacterEvent} events.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class CharacterListener implements WorldListener {
|
||||
@Override
|
||||
public boolean dispatch(WorldEvent e) {
|
||||
if (!(e instanceof CharacterEvent))
|
||||
return false;
|
||||
return dispatch((CharacterEvent) e);
|
||||
public abstract class CharacterListener extends
|
||||
FilteredWorldListener<CharacterEvent> {
|
||||
public CharacterListener() {
|
||||
super(CharacterEvent.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see WorldListener#dispatch(WorldEvent)
|
||||
*/
|
||||
protected abstract boolean dispatch(CharacterEvent e);
|
||||
}
|
||||
}
|
||||
@@ -16,24 +16,15 @@
|
||||
*/
|
||||
package com.l2jserver.model.world.clan;
|
||||
|
||||
import com.l2jserver.service.game.world.event.WorldEvent;
|
||||
import com.l2jserver.service.game.world.event.WorldListener;
|
||||
import com.l2jserver.service.game.world.event.FilteredWorldListener;
|
||||
|
||||
/**
|
||||
* This listener will filter to only dispatch {@link ClanEvent} events.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class ClanListener implements WorldListener {
|
||||
@Override
|
||||
public boolean dispatch(WorldEvent e) {
|
||||
if (!(e instanceof ClanEvent))
|
||||
return false;
|
||||
return dispatch((ClanEvent) e);
|
||||
public abstract class ClanListener extends FilteredWorldListener<ClanEvent> {
|
||||
public ClanListener() {
|
||||
super(ClanEvent.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see WorldListener#dispatch(WorldEvent)
|
||||
*/
|
||||
protected abstract boolean dispatch(ClanEvent e);
|
||||
}
|
||||
|
||||
@@ -29,5 +29,8 @@ public interface SpawnEvent extends WorldEvent {
|
||||
@Override
|
||||
Spawnable getObject();
|
||||
|
||||
/**
|
||||
* @return the spawning coordinate
|
||||
*/
|
||||
Coordinate getCoordinate();
|
||||
}
|
||||
@@ -16,24 +16,15 @@
|
||||
*/
|
||||
package com.l2jserver.model.world.item;
|
||||
|
||||
import com.l2jserver.service.game.world.event.WorldEvent;
|
||||
import com.l2jserver.service.game.world.event.WorldListener;
|
||||
import com.l2jserver.service.game.world.event.FilteredWorldListener;
|
||||
|
||||
/**
|
||||
* This listener will filter to only dispatch {@link ItemEvent} events.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class ItemListener implements WorldListener {
|
||||
@Override
|
||||
public boolean dispatch(WorldEvent e) {
|
||||
if (!(e instanceof ItemEvent))
|
||||
return false;
|
||||
return dispatch((ItemEvent) e);
|
||||
public abstract class ItemListener extends FilteredWorldListener<ItemEvent> {
|
||||
public ItemListener() {
|
||||
super(ItemEvent.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see WorldListener#dispatch(WorldEvent)
|
||||
*/
|
||||
protected abstract boolean dispatch(ItemEvent e);
|
||||
}
|
||||
|
||||
@@ -16,24 +16,15 @@
|
||||
*/
|
||||
package com.l2jserver.model.world.player.event;
|
||||
|
||||
import com.l2jserver.service.game.world.event.WorldEvent;
|
||||
import com.l2jserver.service.game.world.event.WorldListener;
|
||||
import com.l2jserver.service.game.world.event.FilteredWorldListener;
|
||||
|
||||
/**
|
||||
* Listener for {@link PlayerEvent}
|
||||
* This listener will filter to only dispatch {@link PlayerEvent} events.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class PlayerListener implements WorldListener {
|
||||
@Override
|
||||
public boolean dispatch(WorldEvent e) {
|
||||
if (!(e instanceof PlayerEvent))
|
||||
return false;
|
||||
return dispatch((PlayerEvent) e);
|
||||
public abstract class PlayerListener extends FilteredWorldListener<PlayerEvent> {
|
||||
public PlayerListener() {
|
||||
super(PlayerEvent.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see WorldListener#dispatch(WorldEvent)
|
||||
*/
|
||||
protected abstract boolean dispatch(PlayerEvent e);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user