Player flying fall damage API (#387)

This commit is contained in:
TreyRuffy
2021-06-10 00:33:50 -06:00
committed by GitHub
parent c7ccefa1c0
commit b45ca00077
2 changed files with 81 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: TreyRuffy <TreyRuffy@users.noreply.github.com>
Date: Wed, 9 Jun 2021 16:31:15 -0600
Subject: [PATCH] Flying Fall Damage API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 9f289576d97c3406d506d3f4fa7287bc74e5b425..df1da8a7dec072ddc33a884973bcad67152576fe 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2185,5 +2185,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param invulnerableTicks Invulnerable ticks remaining
*/
void setSpawnInvulnerableTicks(int invulnerableTicks);
+
+ /**
+ * Allows you to enable fall damage while {@link #getAllowFlight()} is {@code true}
+ *
+ * @param flyingFallDamage Enables fall damage when {@link #getAllowFlight()} is true
+ */
+ public void setFlyingFallDamage(boolean flyingFallDamage);
+
+ /**
+ * Allows you get if fall damage is enabled while {@link #getAllowFlight()} is {@code true}
+ *
+ * @return True if fall damage is enabled when {@link #getAllowFlight()} is true
+ */
+ public boolean hasFlyingFallDamage();
// Purpur end
}