mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-13 10:42:54 +00:00
@@ -7,10 +7,29 @@ import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.capability.Listenable;
|
||||
import com.l2jserver.model.world.player.PlayerEvent;
|
||||
|
||||
/**
|
||||
* Event dispatched once an {@link Item} has been dropped on the ground.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class ItemDropEvent implements ItemEvent, PlayerEvent {
|
||||
/**
|
||||
* The dropping player
|
||||
*/
|
||||
private final Player player;
|
||||
/**
|
||||
* The item dropped
|
||||
*/
|
||||
private final Item item;
|
||||
|
||||
/**
|
||||
* Creates a new instance of this event
|
||||
*
|
||||
* @param player
|
||||
* the dropping player
|
||||
* @param item
|
||||
* the dropped item
|
||||
*/
|
||||
public ItemDropEvent(Player player, Item item) {
|
||||
this.player = player;
|
||||
this.item = item;
|
||||
|
||||
@@ -3,6 +3,15 @@ package com.l2jserver.model.world.item;
|
||||
import com.l2jserver.model.world.Item;
|
||||
import com.l2jserver.model.world.event.WorldEvent;
|
||||
|
||||
/**
|
||||
* Base event for items
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*
|
||||
*/
|
||||
public interface ItemEvent extends WorldEvent {
|
||||
/**
|
||||
* @return the item
|
||||
*/
|
||||
Item getItem();
|
||||
}
|
||||
|
||||
@@ -2,5 +2,10 @@ package com.l2jserver.model.world.item;
|
||||
|
||||
import com.l2jserver.model.world.event.WorldListener;
|
||||
|
||||
/**
|
||||
* Listener for {@link ItemEvent}
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface ItemListener extends WorldListener<ItemEvent> {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user