13
0
geforkt von Mirrors/Paper

Fixed Material.getData returning for "dull" materials with no fancy dataclass

By: Dinnerbone <dinnerbone@dinnerbone.com>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2011-09-25 03:05:07 +01:00
Ursprung a8e72bdb91
Commit 4d1700d1d9

Datei anzeigen

@ -306,7 +306,7 @@ public enum Material {
* @return MaterialData associated with this Material
*/
public Class<? extends MaterialData> getData() {
return data;
return (data == null) ? MaterialData.class : data;
}
/**
@ -318,7 +318,7 @@ public enum Material {
*/
public MaterialData getNewData(final byte raw) {
if (data == null) {
return null;
return new MaterialData(id, raw);
}
try {