Started issue #7

This commit is contained in:
alisolarflare 2017-04-02 08:36:35 -04:00
parent 84398377b1
commit 8f35cfe0a4

View file

@ -7,7 +7,10 @@ import org.bukkit.Material;
public class Translator {
private HashMap<Color, Data> dictionary;
public Translator(){
this.dictionary = dictionary();
}
public HashMap<Color, Data> dictionary(){
HashMap<Color, Data> dictionary = new HashMap<Color, Data>();
dictionary.put(new Color(255, 255, 255) , new Data(Material.WOOL, DyeColor.WHITE));//white
@ -30,6 +33,9 @@ public class Translator {
return dictionary;
}
public Material material(int red, int green, int blue){
return dictionary.get(new Color(red, green, blue)).material;
}
class Data{
public Material material;
public DyeColor dyeColor;