Solved Just say Yes or No || LeatherArmorMeta

Discussion in 'Plugin Development' started by TheLexoPlexx, Jul 19, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    TheLexoPlexx

    Hey there, I'm not sure and before I test it I wanted to ask the Bukkit-Communityif this even works:
    Code:
        //Inferno-Plate X
        static ItemStack ipis = new ItemStack(Material.LEATHER_CHESTPLATE);
        static {
            ItemMeta im = ipis.getItemMeta();
        im.setDisplayName(ChatColor.DARK_RED + "Inferno Plate");
        LeatherArmorMeta lam = null;
        lam.setColor(Color.RED);
        ArrayList<String> lore = new ArrayList<String>();
        lore.add(ChatColor.GRAY + "Level 1");
        lore.add("");
        lore.add(ChatColor.GOLD + "If you burn you deal double");
        lore.add(ChatColor.GOLD + "damage to your opponents");
        im.setLore(lore);
        ipis.setItemMeta(im);
        }
     
  2. Offline

    Skye

    Definitely not.
     
  3. Offline

    jimuskin


    My guess is no.
     
  4. Offline

    rippin

    No this will not work. LeatherArmorMeta lam = null; Will obviously give a null pointer exception. Do this LeatherArmorMeta lam = (LeatherArmorMeta) im;
     
  5. Offline

    MomsKnife

    LeatherArmorMeta lam = (LeatherArmorMeta) ipis.getItemMeta;
     
  6. Offline

    TheLexoPlexx

    Okay thanks :D
     
  7. Offline

    fireblast709

    That static.
     
Thread Status:
Not open for further replies.

Share This Page