+ if (key == null) {
+ key = Instance.getInstance().getConfig()
+ .getString(Config.SERVER_KEY);
+
+ // If a subkey in RW mode exists, use it
+ for (String subkey : Instance.getInstance().getConfig()
+ .getList(Config.SERVER_ALLOWED_SUBKEYS,
+ new ArrayList<String>())) {
+ if ((subkey + "|").contains("|rw|")) {
+ key = key + "|" + subkey;
+ break;
+ }
+ }
+ }
+
+ if (port == null) {