Changing Leather Armor Error

Discussion in 'Plugin Development' started by Ragnarok_, Jan 22, 2017.

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

    Ragnarok_

    Hey guys, whats up? Today, I've been making another plugin and what happened was I keep getting an error. I'm trying to set the color of Leather Armor, and I keep getting this error, that apparently other people don't get. When I try set the color, I get an error. Here's the code and here's what I get:
    Code:
    lch.setColor(Color.fromRGB(255, 0, 0));
    That's one of the methods I tried, and I get the error: 'The method fromRGB(int, int, int) is undefined for the type Ansi.Color'

    Here's the other method:
    Code:
    lch.setColor(Color.BLACK);
    This method I tried, and I get the error: 'The method setColor(Color) in the type LeatherArmorMeta is not applicable for the arguments (Ansi.Color)'

    I also tried to do 'lch.setColor(Color.fromRGB(255, 0, 0));' and in the parenthesis use a variable/string to put inside it. No luck. Please help! Thanks regardless!
     
  2. Offline

    Zombie_Striker

    @Ragnarok_
    You imported the wrong Color variable. Remove the Ansi.Color import and use the base Java color import.
     
  3. Offline

    Ragnarok_

    Thanks!
     
  4. Offline

    Zombie_Striker

    @Ragnarok_
    If your problem has been solved, mark this thread as solved.
     
Thread Status:
Not open for further replies.

Share This Page