From cd30a97cbb76c634d59ab3e70216d2dbf4a38f8d Mon Sep 17 00:00:00 2001 From: TheMode Date: Wed, 2 Jun 2021 18:04:08 +0200 Subject: [PATCH] Make PlayerEvent extends EntityEvent --- .../net/minestom/server/event/trait/PlayerEvent.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minestom/server/event/trait/PlayerEvent.java b/src/main/java/net/minestom/server/event/trait/PlayerEvent.java index efb03c6bc..2fb8834fd 100644 --- a/src/main/java/net/minestom/server/event/trait/PlayerEvent.java +++ b/src/main/java/net/minestom/server/event/trait/PlayerEvent.java @@ -1,10 +1,9 @@ package net.minestom.server.event.trait; import net.minestom.server.entity.Player; -import net.minestom.server.event.Event; import org.jetbrains.annotations.NotNull; -public interface PlayerEvent extends Event { +public interface PlayerEvent extends EntityEvent { /** * Gets the player. @@ -12,4 +11,12 @@ public interface PlayerEvent extends Event { * @return the player */ @NotNull Player getPlayer(); + + /** + * Returns {@link #getPlayer()}. + */ + @Override + default @NotNull Player getEntity() { + return getPlayer(); + } }