Dieser Commit ist enthalten in:
Ursprung
50a58afa6a
Commit
5076ef955b
@ -51,7 +51,11 @@ public class SWItem {
|
|||||||
|
|
||||||
public static Material getMaterial(String material){
|
public static Material getMaterial(String material){
|
||||||
try{
|
try{
|
||||||
return FlatteningWrapper.impl.getMaterial(material);
|
Material m = FlatteningWrapper.impl.getMaterial(material);
|
||||||
|
if(m == null)
|
||||||
|
return Material.BARRIER;
|
||||||
|
|
||||||
|
return m;
|
||||||
}catch(IllegalArgumentException e){
|
}catch(IllegalArgumentException e){
|
||||||
return Material.STONE;
|
return Material.STONE;
|
||||||
}
|
}
|
||||||
@ -90,14 +94,10 @@ public class SWItem {
|
|||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public SWItem(Material material, byte meta, String name, List<String> lore, boolean enchanted, InvCallback c) {
|
public SWItem(Material material, byte meta, String name, List<String> lore, boolean enchanted, InvCallback c) {
|
||||||
|
|
||||||
if(material != null) {
|
try {
|
||||||
try {
|
itemStack = new ItemStack(material, 1, (short)0, meta);
|
||||||
itemStack = new ItemStack(material, 1, (short) 0, meta);
|
} catch (IllegalArgumentException e) {
|
||||||
} catch (IllegalArgumentException e) {
|
itemStack = new ItemStack(material, 1);
|
||||||
itemStack = new ItemStack(material, 1);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
itemStack = new ItemStack(Material.BARRIER, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
itemMeta = itemStack.getItemMeta();
|
itemMeta = itemStack.getItemMeta();
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren