mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-13 10:42:54 +00:00
Change-Id: Ifa069a09d1b603781a2c9255d89b77cd6f25a359
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package com.l2jserver.model.world.item;
|
||||
|
||||
import com.l2jserver.model.world.Item;
|
||||
import com.l2jserver.model.world.Player;
|
||||
import com.l2jserver.model.world.WorldObject;
|
||||
import com.l2jserver.model.world.player.PlayerEvent;
|
||||
|
||||
public class ItemDropEvent implements ItemEvent, PlayerEvent {
|
||||
private final Player player;
|
||||
private final Item item;
|
||||
|
||||
public ItemDropEvent(Player player, Item item) {
|
||||
this.player = player;
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WorldObject getObject() {
|
||||
return item;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatch() {
|
||||
item.dispatch(this);
|
||||
if (player != null)
|
||||
player.dispatch(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user