aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0217-Player-elytra-boost-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0217-Player-elytra-boost-API.patch')
-rw-r--r--patches/api/0217-Player-elytra-boost-API.patch11
1 files changed, 8 insertions, 3 deletions
diff --git a/patches/api/0217-Player-elytra-boost-API.patch b/patches/api/0217-Player-elytra-boost-API.patch
index 1e1555551d..59f6d90234 100644
--- a/patches/api/0217-Player-elytra-boost-API.patch
+++ b/patches/api/0217-Player-elytra-boost-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
-index 81e8bfbe4380090830591274025a026de740fd05..e9df321980d0744a50edf2d5f978340013588803 100644
+index 81e8bfbe4380090830591274025a026de740fd05..36e3f86f463cd7b6bca4c8b63739a06f17d7e28a 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
-@@ -2880,6 +2880,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
+@@ -2880,6 +2880,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
@NotNull
<T> T getClientOption(@NotNull com.destroystokyo.paper.ClientOption<T> option);
@@ -22,9 +22,14 @@ index 81e8bfbe4380090830591274025a026de740fd05..e9df321980d0744a50edf2d5f9783400
+ * @return The {@link Firework} boosting the Player or null if the spawning of the entity was cancelled
+ * @throws IllegalArgumentException if {@link #isGliding()} is false
+ * or if the {@code firework} isn't a {@link Material#FIREWORK_ROCKET}
++ * @deprecated use {@link HumanEntity#fireworkBoost(ItemStack)} instead. Note that this method <b>does not</b>
++ * check if the player is gliding or not.
+ */
+ @Nullable
-+ Firework boostElytra(@NotNull ItemStack firework);
++ default Firework boostElytra(@NotNull ItemStack firework) {
++ com.google.common.base.Preconditions.checkState(this.isGliding(), "Player must be gliding");
++ return this.fireworkBoost(firework);
++ }
// Paper end
// Spigot start