mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
Deprecate Player#boostElytra (#9899)
The Paper method was chosen for deprecation because it was more restrictive in that it has an isGliding check.
This commit is contained in:
@@ -22,9 +22,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @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
|
||||
|
Reference in New Issue
Block a user