Remove temporary servers from the config when finished

This commit is contained in:
ME1312 2018-08-20 17:50:27 -04:00
parent 811cc891a0
commit 9f88bb5099
No known key found for this signature in database
GPG Key ID: FEFFE2F698E88FA8
2 changed files with 4 additions and 0 deletions

View File

@ -116,6 +116,8 @@ public class ExternalSubServer extends SubServerContainer {
if (isTemporary()) {
try {
if (host.plugin.config.get().getSection("Servers").getKeys().contains(getName()))
host.plugin.config.get().getSection("Servers").remove(getName());
host.removeSubServer(getName());
} catch (InterruptedException e) {
e.printStackTrace();

View File

@ -149,6 +149,8 @@ public class InternalSubServer extends SubServerContainer {
if (isTemporary()) {
try {
if (host.plugin.config.get().getSection("Servers").getKeys().contains(getName()))
host.plugin.config.get().getSection("Servers").remove(getName());
host.removeSubServer(getName());
} catch (InterruptedException e) {
e.printStackTrace();