Skip to content

Commit

Permalink
Fix http.external_address/port settings ignored. Closes GH-18
Browse files Browse the repository at this point in the history
  • Loading branch information
satoshinm committed Apr 14, 2017
1 parent ded8038 commit 3f72da3
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,30 @@ public void onEnable() {
int ourExternalPort = httpPort;

config.addDefault("http.port", httpPort);
config.addDefault("http.external_address", ourExternalAddress);
config.addDefault("http.external_port", ourExternalPort);

config.addDefault("mc.entity_custom_names", setCustomNames);
config.addDefault("mc.entity_disable_gravity", disableGravity);
config.addDefault("mc.x_center", x_center);
config.addDefault("mc.y_center", y_center);
config.addDefault("mc.z_center", z_center);
config.addDefault("mc.radius", radius);

config.addDefault("nc.y_offset", y_offset);
config.addDefault("http.external_address", ourExternalAddress);
config.addDefault("http.external_port", ourExternalPort);


httpPort = this.getConfig().getInt("http.port");
ourExternalAddress = this.getConfig().getString("http.external_address");
ourExternalPort = this.getConfig().getInt("http.external_port");

setCustomNames = this.getConfig().getBoolean("mc.entity_custom_names");
disableGravity = this.getConfig().getBoolean("mc.entity_disable_gravity");
x_center = this.getConfig().getInt("mc.x_center");
y_center = this.getConfig().getInt("mc.y_center");
z_center = this.getConfig().getInt("mc.z_center");
radius = this.getConfig().getInt("mc.radius");

y_offset = this.getConfig().getInt("nc.y_offset");

saveConfig();
Expand Down

0 comments on commit 3f72da3

Please sign in to comment.