Cleaned up configuration handling and added new logging class.

This commit is contained in:
FrozenCow 2011-05-18 13:51:27 +02:00
parent e5556d9138
commit e28ee185b6
15 changed files with 354 additions and 120 deletions

View file

@ -6,19 +6,16 @@ import java.util.Map;
import org.bukkit.World;
import org.dynmap.Color;
import org.dynmap.ConfigurationNode;
public class HighlightTileRenderer extends DefaultTileRenderer {
protected HashSet<Integer> highlightBlocks = new HashSet<Integer>();
public HighlightTileRenderer(Map<String, Object> configuration) {
public HighlightTileRenderer(ConfigurationNode configuration) {
super(configuration);
Object highlightObj = configuration.get("highlight");
if (highlightObj instanceof List<?>) {
for(Object o : (List<?>)highlightObj) {
highlightBlocks.add((Integer)o);
}
} else if (highlightObj instanceof Integer) {
highlightBlocks.add((Integer)highlightObj);
List<Integer> highlight = configuration.<Integer>getList("highlight");
for(Integer i : highlight) {
highlightBlocks.add(i);
}
}