3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-14 20:10:05 +01:00

deprecate isEnabledByFeature in Item/BlockType

Dieser Commit ist enthalten in:
Jake Potrebic 2024-09-09 19:19:46 -07:00
Ursprung 971a7a5511
Commit 61fe23cd08
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: ECE0B3C133C016C5

Datei anzeigen

@ -100,7 +100,7 @@ index 0000000000000000000000000000000000000000..c4432ee20872eeb127852159cf89ed00
+ @Unmodifiable @NonNull Set<FeatureFlag> getFeatureFlags();
+}
diff --git a/src/main/java/org/bukkit/FeatureFlag.java b/src/main/java/org/bukkit/FeatureFlag.java
index 026b1832bcd163ab89668c991bf002e608e36aef..8fab13dc12c8fd6181479ab6e31e2498a8a91ee5 100644
index 026b1832bcd163ab89668c991bf002e608e36aef..b5e87480b6a1d064547e4e608f3d402825931a00 100644
--- a/src/main/java/org/bukkit/FeatureFlag.java
+++ b/src/main/java/org/bukkit/FeatureFlag.java
@@ -1,37 +1,56 @@
@ -116,10 +116,11 @@ index 026b1832bcd163ab89668c991bf002e608e36aef..8fab13dc12c8fd6181479ab6e31e2498
import org.jetbrains.annotations.ApiStatus;
/**
* This represents a Feature Flag for a World.
- * This represents a Feature Flag for a World.
- * <br>
- * Flags which are unavailable in the current version will be null and/or
- * removed.
+ * This represents a Feature Flag for a {@link io.papermc.paper.world.flag.FeatureFlagSetHolder}.
*/
-@ApiStatus.Experimental
public interface FeatureFlag extends Keyed {
@ -241,7 +242,7 @@ index 330e3013eda204aa9b33d5e1c3104e0b595abdbc..c80e0ef587a001ee6de3f5c182cc9696
/**
* Do not use, method will get removed, and the plugin won't run
diff --git a/src/main/java/org/bukkit/block/BlockType.java b/src/main/java/org/bukkit/block/BlockType.java
index 8f430a4067fc722ebfbca846cccded4fb0a3a4e5..4aa79016eb5f7edf930c82d30ff25078fdb88436 100644
index 8f430a4067fc722ebfbca846cccded4fb0a3a4e5..a98cc1bc25fcde49b525ae6f841ea2841111e028 100644
--- a/src/main/java/org/bukkit/block/BlockType.java
+++ b/src/main/java/org/bukkit/block/BlockType.java
@@ -123,7 +123,7 @@ import org.jetbrains.annotations.Nullable;
@ -253,6 +254,16 @@ index 8f430a4067fc722ebfbca846cccded4fb0a3a4e5..4aa79016eb5f7edf930c82d30ff25078
/**
* Typed represents a subtype of {@link BlockType}s that have a known block
@@ -3479,7 +3479,9 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
*
* @param world the world to check
* @return true if this BlockType can be used in this World.
+ * @deprecated Use {@link io.papermc.paper.world.flag.FeatureFlagSetHolder#isEnabled(io.papermc.paper.world.flag.FeatureDependant)}
*/
+ @Deprecated(forRemoval = true, since = "1.21.1") // Paper
boolean isEnabledByFeature(@NotNull World world);
/**
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
index ba605ad75d4ed920c0dc4527529998041a58676b..a78e1c431a6ea46ba7c44880e25a871f473bef41 100644
--- a/src/main/java/org/bukkit/entity/EntityType.java
@ -280,7 +291,7 @@ index 5067f1371433cccd3287af7f03e152f2c3c1ece3..e0cb282541548ac3bd24cce86b3413f5
/**
* Gets the unique name of this world
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
index 0168f0a14a3e899e84c5e36963ff79950ab580fb..86887e8b20288b8204adcc64993b39f94269a0eb 100644
index 0168f0a14a3e899e84c5e36963ff79950ab580fb..5b4449f63595193efcd1329b9df0558cfaa2c7b2 100644
--- a/src/main/java/org/bukkit/inventory/ItemType.java
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
@@ -48,7 +48,7 @@ import org.jetbrains.annotations.Nullable;
@ -292,6 +303,16 @@ index 0168f0a14a3e899e84c5e36963ff79950ab580fb..86887e8b20288b8204adcc64993b39f9
/**
* Typed represents a subtype of {@link ItemType}s that have a known item meta type
@@ -2306,7 +2306,9 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
*
* @param world the world to check
* @return true if this ItemType can be used in this World.
+ * @deprecated use {@link io.papermc.paper.world.flag.FeatureFlagSetHolder#isEnabled(io.papermc.paper.world.flag.FeatureDependant)}
*/
+ @Deprecated(forRemoval = true, since = "1.21.1") // Paper
boolean isEnabledByFeature(@NotNull World world);
/**
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
index 10fa51d116b40450b51af9110d5637f3505ebf65..647452f16e4bf7e5a61520123e62d9408ec9adfb 100644
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java