SPIGOT-4214: Catch attempts to create BlockData for items
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -417,6 +417,8 @@ public class CraftBlockData implements BlockData {
|
||||
}
|
||||
|
||||
public static CraftBlockData newData(Material material, String data) {
|
||||
Preconditions.checkArgument(material == null || material.isBlock(), "Cannot get data for not block %s", material);
|
||||
|
||||
IBlockData blockData;
|
||||
Block block = CraftMagicNumbers.getBlock(material);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user