File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
cloudnet/src/main/java/de/dytanic/cloudnet Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ public List<String> getCompletableAnswers() {
198
198
if (animation .hasResult ("internalHost" )) {
199
199
HostAndPort defaultHost = (HostAndPort ) animation .getResult ("internalHost" );
200
200
201
- this .cloudNet .getConfig ().setDefaultHostAddress (defaultHost .getHost ());
201
+ this .cloudNet .getConfig ().setHostAddress (defaultHost .getHost ());
202
202
this .cloudNet .getConfig ().setIdentity (new NetworkClusterNode (
203
203
animation .hasResult ("nodeId" ) ? (String ) animation .getResult ("nodeId" ) : "Node-" + UUID .randomUUID ().toString ().split ("-" )[0 ],
204
204
new HostAndPort []{defaultHost }
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ public interface IConfiguration {
18
18
19
19
String getHostAddress ();
20
20
21
+ void setHostAddress (String hostAddress );
22
+
21
23
NetworkClusterNode getIdentity ();
22
24
23
25
void setIdentity (NetworkClusterNode identity );
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public final class JsonConfiguration implements IConfiguration {
26
26
}.getType (),
27
27
CLUSTER = new TypeToken <NetworkCluster >() {
28
28
}.getType (),
29
- COLLECTION_STRING = new TypeToken <Collection <String >>() {
29
+ SET_STRING = new TypeToken <Set <String >>() {
30
30
}.getType (),
31
31
HOST_AND_PORT_COLLECTION = new TypeToken <Collection <HostAndPort >>() {
32
32
}.getType ();
@@ -105,7 +105,7 @@ public void load() {
105
105
addresses .addAll (Arrays .asList (System .getenv ("CLOUDNET_DEFAULT_IP_WHITELIST" ).split ("," )));
106
106
}
107
107
108
- this .ipWhitelist = this .document .get ("ipWhitelist" , COLLECTION_STRING , addresses );
108
+ this .ipWhitelist = this .document .get ("ipWhitelist" , SET_STRING , addresses );
109
109
110
110
this .clusterConfig = this .document .get ("cluster" , CLUSTER , new NetworkCluster (
111
111
System .getenv ("CLOUDNET_CLUSTER_ID" ) != null ?
@@ -303,6 +303,11 @@ public void setHttpListeners(Collection<HostAndPort> httpListeners) {
303
303
this .save ();
304
304
}
305
305
306
+ @ Override
307
+ public void setHostAddress (String hostAddress ) {
308
+ this .hostAddress = hostAddress ;
309
+ }
310
+
306
311
public ConfigurationOptionSSL getClientSslConfig () {
307
312
return this .clientSslConfig ;
308
313
}
You can’t perform that action at this time.
0 commit comments