Depcrecate the regions plugins (add warnings, disable when replacement plugins are active). Remove example configuration.txt entries.

This commit is contained in:
Mike Primm 2011-11-24 07:47:22 +08:00 committed by mikeprimm
parent 0a790b6014
commit 54589cd358
3 changed files with 27 additions and 128 deletions

View file

@ -9,17 +9,23 @@ import java.util.Map;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
public class ClientComponent extends Component {
private boolean disabled;
public ClientComponent(final DynmapPlugin plugin, final ConfigurationNode configuration) {
super(plugin, configuration);
plugin.events.addListener("buildclientconfiguration", new Event.Listener<JSONObject>() {
@Override
public void triggered(JSONObject root) {
buildClientConfiguration(root);
if(!disabled)
buildClientConfiguration(root);
}
});
}
protected void disableComponent() {
disabled = true;
}
protected void buildClientConfiguration(JSONObject root) {
JSONObject o = createClientConfiguration();
a(root, "components", o);