How do i check if a block is colorable?

Discussion in 'Plugin Development' started by scarletomato, Jan 7, 2014.

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

    scarletomato

    I want to grab any blocks that can be dyed basically.

    Currently I think this list includes Wool, Stained Clay, Stained Glass, Stained Glass Pane, and Carpet

    I tried
    Code:java
    1. MaterialData data = b.getState().getData();
    2. if(data instanceof Colorable){
    3. DyeColor c = ((Colorable)data).getColor();
    4. Bukkit.getServer().broadcastMessage("Is colorable. Color: " + c);
    5. }

    but this only returns Wool blocks as colorable blocks.

    Any ideas?
    thanks
     
  2. They probably haven't implemented yet I guess, that's what I would think.

    Edit: looked at the source: yes, they haven't added it yet.
     
    scarletomato and Garris0n like this.
  3. Offline

    scarletomato

    Okay good to know, thanks for checking.
     
Thread Status:
Not open for further replies.

Share This Page