diff --git a/src/main/java/buttondevteam/minecraft/place/Translator.java b/src/main/java/buttondevteam/minecraft/place/Translator.java index 5fcf84f..a922655 100644 --- a/src/main/java/buttondevteam/minecraft/place/Translator.java +++ b/src/main/java/buttondevteam/minecraft/place/Translator.java @@ -7,7 +7,10 @@ import org.bukkit.Material; public class Translator { - + private HashMap dictionary; + public Translator(){ + this.dictionary = dictionary(); + } public HashMap dictionary(){ HashMap dictionary = new HashMap(); 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;