From 864993ba5edbfcccc35cf1708d5c1759881cdfdc Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 21 Jun 2017 22:44:18 +1000 Subject: [PATCH] SPIGOT-3361: Deprecate confusing MaterialData.toItemStack() By: md_5 --- paper-api/src/main/java/org/bukkit/material/MaterialData.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/material/MaterialData.java b/paper-api/src/main/java/org/bukkit/material/MaterialData.java index 9caf085e43..29826bc3f3 100644 --- a/paper-api/src/main/java/org/bukkit/material/MaterialData.java +++ b/paper-api/src/main/java/org/bukkit/material/MaterialData.java @@ -90,7 +90,10 @@ public class MaterialData implements Cloneable { * Creates a new ItemStack based on this MaterialData * * @return New ItemStack containing a copy of this MaterialData + * @deprecated this method creates an ItemStack of size 0 which is not + * generally useful. Consider {@link #toItemStack(int)}. */ + @Deprecated public ItemStack toItemStack() { return new ItemStack(type, 0, data); }