mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-30 14:03:21 +01:00
Fix a problem with invalid item IDs
This commit is contained in:
parent
a058b80990
commit
f6aad7e397
@ -123,7 +123,10 @@ public class MaterialUtil {
|
|||||||
public static String getSignName(ItemStack itemStack) {
|
public static String getSignName(ItemStack itemStack) {
|
||||||
StringBuilder name = new StringBuilder(15);
|
StringBuilder name = new StringBuilder(15);
|
||||||
|
|
||||||
name.append(itemStack.getType().name());
|
String itemName = itemStack.getType().name();
|
||||||
|
itemName = StringUtil.capitalizeFirstLetter(itemName, '_');
|
||||||
|
|
||||||
|
name.append(itemName);
|
||||||
|
|
||||||
if (itemStack.getDurability() != 0) {
|
if (itemStack.getDurability() != 0) {
|
||||||
name.append(':').append(itemStack.getDurability());
|
name.append(':').append(itemStack.getDurability());
|
||||||
@ -133,7 +136,7 @@ public class MaterialUtil {
|
|||||||
name.append('#').append(Metadata.getItemCode(itemStack));
|
name.append('#').append(Metadata.getItemCode(itemStack));
|
||||||
}
|
}
|
||||||
|
|
||||||
return StringUtil.capitalizeFirstLetter(name.toString(), '_');
|
return name.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user