Add PlayerDeathEvent#getPlayer for clarity (#6859)

This commit is contained in:
HexedHero 2021-11-05 16:30:44 +00:00
parent 97ece388a9
commit 0b77f9e66b

View File

@ -179,3 +179,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
+++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
@@ -0,0 +0,0 @@ public class PlayerDeathEvent extends EntityDeathEvent {
}
// Paper start
+ /**
+ * Clarity method for getting the player. Not really needed except
+ * for reasons of clarity.
+ *
+ * @return Player who is involved in this event
+ */
+ @NotNull
+ public Player getPlayer() {
+ return getEntity();
+ }
+
/**
* Set the death message that will appear to everyone on the server.
*