Solved Colored Armor

Discussion in 'Plugin Development' started by MasterDoctor, Mar 18, 2016.

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

    MasterDoctor

    Hey everyone!
    I was recently trying to make some colored armor and I have tried the following code
    Code:
    LeatherArmorMeta leatherMeta = (LeatherArmorMeta) armorMeta;
                                    int rgb;
                                    rgb = config.getInt("gear.armor." + itemPurchase + ".item.color.hex");
                                    leatherMeta.setColor(Color.fromRGB(rgb));
                                    armorItem.setItemMeta(leatherMeta);
    however in game it just says Color: #0
    Any ideas?

    Fixed my issue:
    I was getting it from the config and not the gear.yml file
     
    Last edited: Mar 18, 2016
  2. Offline

    mcdorli

    Have you tried printing out what you get from the config?
     
    MasterDoctor likes this.
  3. Offline

    MasterDoctor

    4 [See your instance answers]

    OH MY GOD!!!! I AM A RETARD!!!!! It prints 0 xDD

    EDIT: Merged posts but can't delete my other one
    EDIT 2: It's gone
     
  4. Offline

    mcdorli

    I'M happy I was helpful
     
    MasterDoctor likes this.
Thread Status:
Not open for further replies.

Share This Page