Make PlayerEvent extends EntityEvent

This commit is contained in:
TheMode 2021-06-02 18:04:08 +02:00
parent 305aa3e8d9
commit cd30a97cbb

View File

@ -1,10 +1,9 @@
package net.minestom.server.event.trait; package net.minestom.server.event.trait;
import net.minestom.server.entity.Player; import net.minestom.server.entity.Player;
import net.minestom.server.event.Event;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
public interface PlayerEvent extends Event { public interface PlayerEvent extends EntityEvent {
/** /**
* Gets the player. * Gets the player.
@ -12,4 +11,12 @@ public interface PlayerEvent extends Event {
* @return the player * @return the player
*/ */
@NotNull Player getPlayer(); @NotNull Player getPlayer();
/**
* Returns {@link #getPlayer()}.
*/
@Override
default @NotNull Player getEntity() {
return getPlayer();
}
} }