9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-22 08:19:19 +00:00
Files
DivineMC/patches/removed/1.20/api/0002-Rework-Spigot-Deprecations.patch
2025-02-12 00:26:36 +03:00

85 lines
3.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
Date: Fri, 31 Mar 2023 23:38:43 +0300
Subject: [PATCH] Rework Spigot Deprecations
diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java
index df642a55003517040be795b44a8bf107dd88810b..09ae729cfdcc60c3315e3d87422e92db8c482fe5 100644
--- a/src/main/java/org/bukkit/OfflinePlayer.java
+++ b/src/main/java/org/bukkit/OfflinePlayer.java
@@ -165,9 +165,11 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
* UTC.
*
* @return Date of last log-in for this player, or 0
- * @deprecated The API contract is ambiguous and the implementation may or may not return the correct value given this API ambiguity. It is instead recommended use {@link #getLastLogin()} or {@link #getLastSeen()} depending on your needs.
+ * @see #hasPlayedBefore()
+ * @see #getLastLogin()
+ * @see #getLastSeen()
*/
- @Deprecated
+ // @Deprecated // DivineMC - remove deprecated
public long getLastPlayed();
/**
diff --git a/src/main/java/org/bukkit/entity/Damageable.java b/src/main/java/org/bukkit/entity/Damageable.java
index fc4d3bcd9b16097086fef7975274d825b65adb10..e485975dbb6973d2b21259c4e4d5d75191bacb60 100644
--- a/src/main/java/org/bukkit/entity/Damageable.java
+++ b/src/main/java/org/bukkit/entity/Damageable.java
@@ -60,9 +60,9 @@ public interface Damageable extends Entity {
* Gets the maximum health this entity has.
*
* @return Maximum health
- * @deprecated use {@link Attribute#GENERIC_MAX_HEALTH}.
+ * @see Attribute#GENERIC_MAX_HEALTH
*/
- @Deprecated
+ // @Deprecated // DivineMC
double getMaxHealth();
/**
@@ -75,15 +75,15 @@ public interface Damageable extends Entity {
* {@link Wither}, etc...} will have their bar scaled accordingly.
*
* @param health amount of health to set the maximum to
- * @deprecated use {@link Attribute#GENERIC_MAX_HEALTH}.
+ * @see Attribute#GENERIC_MAX_HEALTH
*/
- @Deprecated
+ // @Deprecated // DivineMC
void setMaxHealth(double health);
/**
* Resets the max health to the original amount.
- * @deprecated use {@link Attribute#GENERIC_MAX_HEALTH}.
+ * @see Attribute#GENERIC_MAX_HEALTH
*/
- @Deprecated
+ // @Deprecated // DivineMC
void resetMaxHealth();
}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 482c7893ecd14f189ae4fa2d5a0f4c96f4a85137..de4fe49abe3dba096e63247cbba92a58c5486aee 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -281,14 +281,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Returns true if the entity is supported by a block.
*
* This value is a state updated by the client after each movement.
- *
- * @return True if entity is on ground.
- * @deprecated This value is controlled only by the client and is therefore
+ * <p>
+ * Note: This value is controlled only by the client and is therefore
* unreliable and vulnerable to spoofing and/or desync depending on the
* context/time which it is accessed
+ *
+ * @return True if entity is on ground.
*/
@Override
- @Deprecated
+ // @Deprecated // DivineMC
public boolean isOnGround();
/**