mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-23 02:55:27 +01:00
70 lines
2.7 KiB
Diff
70 lines
2.7 KiB
Diff
|
From 2f7aa5b35b6460e4070743fb96678e304b67ece6 Mon Sep 17 00:00:00 2001
|
||
|
From: Aikar <aikar@aikar.co>
|
||
|
Date: Wed, 27 Apr 2016 02:14:00 -0400
|
||
|
Subject: [PATCH] EMC Rework Spigot Deprecations
|
||
|
|
||
|
Deprecate Inventory.getContents because md5 likes to make stupid changes
|
||
|
Undeprecate (get/set)MaxHealth
|
||
|
---
|
||
|
src/main/java/org/bukkit/entity/Damageable.java | 4 ----
|
||
|
src/main/java/org/bukkit/inventory/Inventory.java | 7 +++++--
|
||
|
2 files changed, 5 insertions(+), 6 deletions(-)
|
||
|
|
||
|
diff --git a/src/main/java/org/bukkit/entity/Damageable.java b/src/main/java/org/bukkit/entity/Damageable.java
|
||
|
index fc4d3bcd..13e8ce4d 100644
|
||
|
--- a/src/main/java/org/bukkit/entity/Damageable.java
|
||
|
+++ b/src/main/java/org/bukkit/entity/Damageable.java
|
||
|
@@ -60,9 +60,7 @@ public interface Damageable extends Entity {
|
||
|
* Gets the maximum health this entity has.
|
||
|
*
|
||
|
* @return Maximum health
|
||
|
- * @deprecated use {@link Attribute#GENERIC_MAX_HEALTH}.
|
||
|
*/
|
||
|
- @Deprecated
|
||
|
double getMaxHealth();
|
||
|
|
||
|
/**
|
||
|
@@ -75,9 +73,7 @@ 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}.
|
||
|
*/
|
||
|
- @Deprecated
|
||
|
void setMaxHealth(double health);
|
||
|
|
||
|
/**
|
||
|
diff --git a/src/main/java/org/bukkit/inventory/Inventory.java b/src/main/java/org/bukkit/inventory/Inventory.java
|
||
|
index 01fe217d..730f6e0f 100644
|
||
|
--- a/src/main/java/org/bukkit/inventory/Inventory.java
|
||
|
+++ b/src/main/java/org/bukkit/inventory/Inventory.java
|
||
|
@@ -156,20 +156,23 @@ public interface Inventory extends Iterable<ItemStack> {
|
||
|
/**
|
||
|
* Returns all ItemStacks from the inventory
|
||
|
*
|
||
|
- * @return An array of ItemStacks from the inventory. Individual items may be null.
|
||
|
+ * @deprecated because people love breaking API's for no reason. you probally want @{see {@link #getStorageContents()}}
|
||
|
+ * @return An array of ItemStacks from the inventory.
|
||
|
*/
|
||
|
- @NotNull
|
||
|
+ @Deprecated @NotNull
|
||
|
public ItemStack[] getContents();
|
||
|
|
||
|
/**
|
||
|
* Completely replaces the inventory's contents. Removes all existing
|
||
|
* contents and replaces it with the ItemStacks given in the array.
|
||
|
*
|
||
|
+ @deprecated because people love breaking API's for no reason. you probally want @{see {@link #setStorageContents(ItemStack[])}}
|
||
|
* @param items A complete replacement for the contents; the length must
|
||
|
* be less than or equal to {@link #getSize()}.
|
||
|
* @throws IllegalArgumentException If the array has more items than the
|
||
|
* inventory.
|
||
|
*/
|
||
|
+ @Deprecated
|
||
|
public void setContents(@NotNull ItemStack[] items) throws IllegalArgumentException;
|
||
|
|
||
|
/**
|
||
|
--
|
||
|
2.25.1.windows.1
|
||
|
|