Solved Colored leather armor?

Discussion in 'Plugin Development' started by Ibix13, May 17, 2013.

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

    caseif

    No, those are bytes. Zach_1919 is referring to color hex codes. Take a look at the lines I posted.
     
  2. Offline

    Ibix13

    Oh
    It gives me an error on both of them tho
     
  3. Offline

    Zach_1919

    AngryNerd Bam Ninja'd you again :p

    You're not supposed to use both. I would recommend the second one since you can get more specific colors with it.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
  4. Offline

    caseif

    Okay, error?

    EDIT: Whoops, the hex code needs to be a String, i.e. it needs to be in double quotes. As for the Color enum, I was just guessing at that. I'm not guaranteeing there's an enum entry for dark green, it was just an example.
     
  5. It would be really lolled if he used both...
     
  6. Offline

    Zach_1919

  7. Offline

    Ibix13

    On the Dark_Green once its DARK_GREEN cannot be resolved or is not a field and the other one on setColor is The method setColor(Color) is undefined for the type ItemStack and on the new Color its The constructor Color(int) is undefined

    no i didnt bro

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
  8. If that would be so then (sorry) but this would be my face:[​IMG]
     
  9. Offline

    Ibix13

    Ohhhh
    ok
     
  10. Offline

    Zach_1919

    Did you even read his post? He just said that the DARK_GREEN thing was just a guess. It's not real. Also, he said that the hex code has to go in double quotation marks (") because it's a string, not an integer.
     
  11. Offline

    Ibix13

    I posted that before i saw his post.
     
  12. Offline

    Zach_1919

    Oh, ok.
     
  13. Offline

    Ibix13

    Here is code :
    Code:
                                                ItemStack armor = new ItemStack(Material.LEATHER_HELMET);
                                                LeatherArmorMeta meta = (LeatherArmorMeta) armor.getItemMeta();
                                                ((LeatherArmorMeta) armor).setColor(Color.GREEN);
                                                ((LeatherArmorMeta) armor).setColor(new Color("#005500"));
                                                armor.setItemMeta(meta);
    I have error on setColor(new Color): The constructor Color(String) is undefined
     
  14. Offline

    Zach_1919

    Ibix13 CaptainBern AngryNerd Well, we have given him many clear sources, and literally gave him the code, and he still can't figure it out. I'm out, how about you guys?
     
  15. Offline

    caseif

    I think it's time to resign as well.
     
  16. Offline

    Ibix13

    If you don't stop posting this nasty stuff i'm reporting...
     
  17. Let's get a beer..
     
  18. Offline

    Zach_1919

    AngryNerd By the way, how do you make the achievement sigs? I've seen them a lot and I quite like them.

    Ibix13 It's not our fault that you can't understand something that we are feeding to you like a baby.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
  19. Offline

    Ibix13

    I jsut reporting everything you said..
     
  20. Offline

    Zach_1919

  21. Can we make achievement signs? (the little box in the upper corner?)

    I'm scared now...

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
  22. Offline

    Ibix13

    Can you plz just help me :(
     
  23. You are very rude, we literally gave you the code you needed and did we get a single "thank you"? Nope we didn't, no reporting everything we said, yeah let's do that...You aren't going to get any help with that atitude...
     
  24. Offline

    Zach_1919

    CaptainBern You tell him girl

    CaptainBern I don't know about you but this was an enjoyable and amusing experience.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
  25. Haha, first time someone was that rude...
     
  26. Offline

    Zach_1919

  27. I mean the OP...lol
     
  28. Offline

    Zach_1919

    CaptainBern Hey how do I link my dev account with my forum account so it says like dev.bukkit.org profile:
     
Thread Status:
Not open for further replies.

Share This Page