Started issue #7
This commit is contained in:
parent
84398377b1
commit
8f35cfe0a4
1 changed files with 7 additions and 1 deletions
|
@ -7,7 +7,10 @@ import org.bukkit.Material;
|
||||||
|
|
||||||
public class Translator {
|
public class Translator {
|
||||||
|
|
||||||
|
private HashMap<Color, Data> dictionary;
|
||||||
|
public Translator(){
|
||||||
|
this.dictionary = dictionary();
|
||||||
|
}
|
||||||
public HashMap<Color, Data> dictionary(){
|
public HashMap<Color, Data> dictionary(){
|
||||||
HashMap<Color, Data> dictionary = new HashMap<Color, Data>();
|
HashMap<Color, Data> dictionary = new HashMap<Color, Data>();
|
||||||
dictionary.put(new Color(255, 255, 255) , new Data(Material.WOOL, DyeColor.WHITE));//white
|
dictionary.put(new Color(255, 255, 255) , new Data(Material.WOOL, DyeColor.WHITE));//white
|
||||||
|
@ -30,6 +33,9 @@ public class Translator {
|
||||||
|
|
||||||
return dictionary;
|
return dictionary;
|
||||||
}
|
}
|
||||||
|
public Material material(int red, int green, int blue){
|
||||||
|
return dictionary.get(new Color(red, green, blue)).material;
|
||||||
|
}
|
||||||
class Data{
|
class Data{
|
||||||
public Material material;
|
public Material material;
|
||||||
public DyeColor dyeColor;
|
public DyeColor dyeColor;
|
||||||
|
|
Loading…
Reference in a new issue