Add trait to ItemDropEvent

This commit is contained in:
TheMode 2021-06-10 11:58:48 +02:00
parent 74d323126f
commit ea05a6f784

View File

@ -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;
} }
} }