Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SuppressWarnings("deprecation")
- public static String getItemName(String i) {
- if(i.equals("33:0")) return "Piston";
- if(i.equals("397:5")) return "Dragon's head";
- String[] dataid = i.split(":");
- int id = Integer.parseInt(dataid[0]);
- int data = Integer.parseInt(dataid[1]);
- ItemStack a = new ItemStack(id, 1, (byte) data);
- String item = a.getType().toString();
- String name = "";
- for (String word : item.split("_"))
- name += word.substring(0, 1) + word.substring(1, word.length()).toLowerCase() + " ";
- name = name.substring(0, name.length() - 1);
- return name;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement