diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-09-25 03:05:07 +0100 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-09-25 03:05:07 +0100 |
commit | 2bed49c0fe15a61592742eb5c8ec58c893d23e9a (patch) | |
tree | 02142e273978965da34923f6219d3421d1541677 | |
parent | fe4f4c5f589cf533e0a582a0effa62ed306d201b (diff) | |
download | bukkit-2bed49c0fe15a61592742eb5c8ec58c893d23e9a.tar bukkit-2bed49c0fe15a61592742eb5c8ec58c893d23e9a.tar.gz bukkit-2bed49c0fe15a61592742eb5c8ec58c893d23e9a.tar.lz bukkit-2bed49c0fe15a61592742eb5c8ec58c893d23e9a.tar.xz bukkit-2bed49c0fe15a61592742eb5c8ec58c893d23e9a.zip |
Fixed Material.getData returning for "dull" materials with no fancy dataclass
-rw-r--r-- | src/main/java/org/bukkit/Material.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java index 3baf2b6e..b316cd52 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java @@ -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 { |