mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-08 01:17:47 +01:00
Add trait to ItemDropEvent
This commit is contained in:
parent
74d323126f
commit
ea05a6f784
@ -3,10 +3,11 @@ package net.minestom.server.event.item;
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.ItemEvent;
|
||||
import net.minestom.server.event.trait.PlayerEvent;
|
||||
import net.minestom.server.item.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ItemDropEvent implements ItemEvent, CancellableEvent {
|
||||
public class ItemDropEvent implements PlayerEvent, ItemEvent, CancellableEvent {
|
||||
|
||||
private final Player player;
|
||||
private final ItemStack itemStack;
|
||||
@ -18,8 +19,8 @@ public class ItemDropEvent implements ItemEvent, CancellableEvent {
|
||||
this.itemStack = itemStack;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Player getPlayer() {
|
||||
@Override
|
||||
public @NotNull Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
@ -37,4 +38,5 @@ public class ItemDropEvent implements ItemEvent, CancellableEvent {
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancelled = cancel;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user