mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 20:22:05 -07:00
Some more compilation fixes
This commit is contained in:
@@ -195,9 +195,51 @@ diff --git a/src/main/java/org/bukkit/potion/PotionBrewer.java b/src/main/java/o
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/potion/PotionBrewer.java
|
||||
+++ b/src/main/java/org/bukkit/potion/PotionBrewer.java
|
||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
|
||||
* Represents a brewer that can create {@link PotionEffect}s.
|
||||
*/
|
||||
public interface PotionBrewer {
|
||||
-
|
||||
+ // Paper start - keep old spigot methods, removal in 1.20.6
|
||||
/**
|
||||
* Creates a {@link PotionEffect} from the given {@link PotionEffectType},
|
||||
* applying duration modifiers and checks.
|
||||
@@ -0,0 +0,0 @@ public interface PotionBrewer {
|
||||
* @param duration The duration in ticks
|
||||
* @param amplifier The amplifier of the effect
|
||||
* @return The resulting potion effect
|
||||
+ * @deprecated use {@link PotionEffectType#createEffect(int, int)} instead.
|
||||
*/
|
||||
+ @Deprecated(forRemoval = true, since = "1.20.5")
|
||||
@NotNull
|
||||
@Deprecated
|
||||
- public PotionEffect createEffect(@NotNull PotionEffectType potion, int duration, int amplifier);
|
||||
+ default PotionEffect createEffect(@NotNull PotionEffectType potion, int duration, int amplifier) {
|
||||
+ return potion.createEffect(duration, amplifier);
|
||||
+ }
|
||||
|
||||
/**
|
||||
* Returns a collection of {@link PotionEffect} that would be applied from
|
||||
@@ -0,0 +0,0 @@ public interface PotionBrewer {
|
||||
* @return The list of effects
|
||||
* @deprecated Non-Functional
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @Deprecated(forRemoval = true, since = "1.20.5")
|
||||
@NotNull
|
||||
- public Collection<PotionEffect> getEffectsFromDamage(int damage);
|
||||
+ default Collection<PotionEffect> getEffectsFromDamage(final int damage) {
|
||||
+ return new java.util.ArrayList<>();
|
||||
+ }
|
||||
+ // Paper start - keep old spigot methods, removal in 1.20.6
|
||||
|
||||
/**
|
||||
* Returns a collection of {@link PotionEffect} that would be applied from
|
||||
@@ -0,0 +0,0 @@ public interface PotionBrewer {
|
||||
* @deprecated Upgraded / extended potions are now their own {@link PotionType} use {@link PotionType#getPotionEffects()} instead
|
||||
*/
|
||||
@NotNull
|
||||
- @Deprecated
|
||||
+ @Deprecated(forRemoval = true, since = "1.20.5")
|
||||
public Collection<PotionEffect> getEffects(@NotNull PotionType type, boolean upgraded, boolean extended);
|
||||
+
|
||||
+ // Paper start
|
||||
|
Reference in New Issue
Block a user