From ea05a6f784b150d9fca4b9bd7d4e994272733c6a Mon Sep 17 00:00:00 2001 From: TheMode Date: Thu, 10 Jun 2021 11:58:48 +0200 Subject: [PATCH] Add trait to ItemDropEvent --- .../net/minestom/server/event/item/ItemDropEvent.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/minestom/server/event/item/ItemDropEvent.java b/src/main/java/net/minestom/server/event/item/ItemDropEvent.java index ecca1e1ca..0652d854d 100644 --- a/src/main/java/net/minestom/server/event/item/ItemDropEvent.java +++ b/src/main/java/net/minestom/server/event/item/ItemDropEvent.java @@ -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; } + }