mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-08 17:37:42 +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.entity.Player;
|
||||||
import net.minestom.server.event.trait.CancellableEvent;
|
import net.minestom.server.event.trait.CancellableEvent;
|
||||||
import net.minestom.server.event.trait.ItemEvent;
|
import net.minestom.server.event.trait.ItemEvent;
|
||||||
|
import net.minestom.server.event.trait.PlayerEvent;
|
||||||
import net.minestom.server.item.ItemStack;
|
import net.minestom.server.item.ItemStack;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public class ItemDropEvent implements ItemEvent, CancellableEvent {
|
public class ItemDropEvent implements PlayerEvent, ItemEvent, CancellableEvent {
|
||||||
|
|
||||||
private final Player player;
|
private final Player player;
|
||||||
private final ItemStack itemStack;
|
private final ItemStack itemStack;
|
||||||
@ -18,8 +19,8 @@ public class ItemDropEvent implements ItemEvent, CancellableEvent {
|
|||||||
this.itemStack = itemStack;
|
this.itemStack = itemStack;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@Override
|
||||||
public Player getPlayer() {
|
public @NotNull Player getPlayer() {
|
||||||
return player;
|
return player;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,4 +38,5 @@ public class ItemDropEvent implements ItemEvent, CancellableEvent {
|
|||||||
public void setCancelled(boolean cancel) {
|
public void setCancelled(boolean cancel) {
|
||||||
this.cancelled = cancel;
|
this.cancelled = cancel;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user