mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-22 08:11:59 +01:00
Remove or replace a few dumb deprecations (#7760)
This commit is contained in:
parent
c7930738d2
commit
471c7df4e4
@ -79,6 +79,27 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
public boolean isLegacy() {
|
public boolean isLegacy() {
|
||||||
return legacy;
|
return legacy;
|
||||||
}
|
}
|
||||||
|
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/org/bukkit/NamespacedKey.java
|
||||||
|
+++ b/src/main/java/org/bukkit/NamespacedKey.java
|
||||||
|
@@ -0,0 +0,0 @@ public final class NamespacedKey implements net.kyori.adventure.key.Key, com.des
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a key in a specific namespace.
|
||||||
|
+ * <p>
|
||||||
|
+ * For most plugin related code, you should prefer using the
|
||||||
|
+ * {@link NamespacedKey#NamespacedKey(Plugin, String)} constructor.
|
||||||
|
*
|
||||||
|
* @param namespace namespace
|
||||||
|
* @param key key
|
||||||
|
- * @deprecated should never be used by plugins, for internal use only!!
|
||||||
|
+ * @see #NamespacedKey(Plugin, String)
|
||||||
|
*/
|
||||||
|
- @Deprecated
|
||||||
|
public NamespacedKey(@NotNull String namespace, @NotNull String key) {
|
||||||
|
Preconditions.checkArgument(namespace != null && VALID_NAMESPACE.matcher(namespace).matches(), "Invalid namespace. Must be [a-z0-9._-]: %s", namespace);
|
||||||
|
Preconditions.checkArgument(key != null && VALID_KEY.matcher(key).matches(), "Invalid key. Must be [a-z0-9/._-]: %s", key);
|
||||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/Server.java
|
--- a/src/main/java/org/bukkit/Server.java
|
||||||
@ -117,6 +138,43 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
*/
|
*/
|
||||||
+@Deprecated // Paper
|
+@Deprecated // Paper
|
||||||
public interface LingeringPotion extends ThrownPotion { }
|
public interface LingeringPotion extends ThrownPotion { }
|
||||||
|
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||||
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||||
|
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||||
|
*
|
||||||
|
* @param plugin Plugin that wants to hide the entity
|
||||||
|
* @param entity Entity to hide
|
||||||
|
- * @deprecated draft API
|
||||||
|
*/
|
||||||
|
- @Deprecated
|
||||||
|
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||||
|
public void hideEntity(@NotNull Plugin plugin, @NotNull Entity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||||
|
*
|
||||||
|
* @param plugin Plugin that wants to show the entity
|
||||||
|
* @param entity Entity to show
|
||||||
|
- * @deprecated draft API
|
||||||
|
*/
|
||||||
|
- @Deprecated
|
||||||
|
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||||
|
public void showEntity(@NotNull Plugin plugin, @NotNull Entity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||||
|
* @param entity Entity to check
|
||||||
|
* @return True if the provided entity is not being hidden from this
|
||||||
|
* player
|
||||||
|
- * @deprecated draft API
|
||||||
|
*/
|
||||||
|
- @Deprecated
|
||||||
|
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||||
|
public boolean canSee(@NotNull Entity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
--- a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
||||||
@ -148,6 +206,36 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
return offers;
|
return offers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/bukkit/event/player/PlayerHideEntityEvent.java b/src/main/java/org/bukkit/event/player/PlayerHideEntityEvent.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/org/bukkit/event/player/PlayerHideEntityEvent.java
|
||||||
|
+++ b/src/main/java/org/bukkit/event/player/PlayerHideEntityEvent.java
|
||||||
|
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
|
||||||
|
* This event is called regardless of if the entity was within tracking range.
|
||||||
|
*
|
||||||
|
* @see Player#hideEntity(org.bukkit.plugin.Plugin, org.bukkit.entity.Entity)
|
||||||
|
- * @deprecated draft API
|
||||||
|
*/
|
||||||
|
-@Deprecated
|
||||||
|
+@org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||||
|
@Warning(false)
|
||||||
|
public class PlayerHideEntityEvent extends PlayerEvent {
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/bukkit/event/player/PlayerShowEntityEvent.java b/src/main/java/org/bukkit/event/player/PlayerShowEntityEvent.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/org/bukkit/event/player/PlayerShowEntityEvent.java
|
||||||
|
+++ b/src/main/java/org/bukkit/event/player/PlayerShowEntityEvent.java
|
||||||
|
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
|
||||||
|
* range.
|
||||||
|
*
|
||||||
|
* @see Player#showEntity(org.bukkit.plugin.Plugin, org.bukkit.entity.Entity)
|
||||||
|
- * @deprecated draft API
|
||||||
|
*/
|
||||||
|
-@Deprecated
|
||||||
|
+@org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||||
|
@Warning(false)
|
||||||
|
public class PlayerShowEntityEvent extends PlayerEvent {
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/CraftingInventory.java b/src/main/java/org/bukkit/inventory/CraftingInventory.java
|
diff --git a/src/main/java/org/bukkit/inventory/CraftingInventory.java b/src/main/java/org/bukkit/inventory/CraftingInventory.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/CraftingInventory.java
|
--- a/src/main/java/org/bukkit/inventory/CraftingInventory.java
|
||||||
|
Loading…
Reference in New Issue
Block a user