mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
More useful names for block ItemTypes.
This commit is contained in:
parent
c3ee926a2e
commit
aafb854e4f
@ -32,7 +32,16 @@ public class BundledItemRegistry implements ItemRegistry {
|
||||
@Nullable
|
||||
@Override
|
||||
public String getName(ItemType itemType) {
|
||||
BundledItemData.ItemEntry itemEntry = BundledItemData.getInstance().findById(itemType.getId());
|
||||
return itemEntry != null ? itemEntry.localizedName : null;
|
||||
String id = itemType.getId();
|
||||
BundledItemData.ItemEntry itemEntry = BundledItemData.getInstance().findById(id);
|
||||
if (itemEntry != null) {
|
||||
String localized = itemEntry.localizedName;
|
||||
if (localized.equals("Air")) {
|
||||
int c = id.indexOf(':');
|
||||
return c < 0 ? id : id.substring(c + 1);
|
||||
}
|
||||
return localized;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user