Fixed getData() not returning the correct values.

By: EvilSeph <evilseph@unaligned.org>
This commit is contained in:
Bukkit/Spigot 2011-04-25 07:17:12 -04:00
parent 865f44281e
commit 485a47aac4

View File

@ -116,6 +116,10 @@ public class ItemStack {
* @return MaterialData for this item
*/
public MaterialData getData() {
if (Material.getMaterial(getTypeId()).getData() != null) {
data = Material.getMaterial(getTypeId()).getNewData((byte)this.durability);
}
return data;
}