SchematicSelectorItemFix #203
@ -51,7 +51,11 @@ public class SWItem {
|
||||
|
||||
public static Material getMaterial(String material){
|
||||
try{
|
||||
return FlatteningWrapper.impl.getMaterial(material);
|
||||
Material m = FlatteningWrapper.impl.getMaterial(material);
|
||||
if(m == null)
|
||||
return Material.BARRIER;
|
||||
|
||||
return m;
|
||||
}catch(IllegalArgumentException e){
|
||||
return Material.STONE;
|
||||
}
|
||||
@ -89,11 +93,13 @@ public class SWItem {
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public SWItem(Material material, byte meta, String name, List<String> lore, boolean enchanted, InvCallback c) {
|
||||
|
||||
try {
|
||||
itemStack = new ItemStack(material, 1, (short)0, meta);
|
||||
} catch (IllegalArgumentException e) {
|
||||
itemStack = new ItemStack(material, 1);
|
||||
}
|
||||
|
||||
itemMeta = itemStack.getItemMeta();
|
||||
|
||||
if (itemMeta != null) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren