Cleaned up configuration handling and added new logging class.
This commit is contained in:
parent
e5556d9138
commit
e28ee185b6
15 changed files with 354 additions and 120 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue