Skip to content

Commit

Permalink
Remove temporary servers from the config when finished
Browse files Browse the repository at this point in the history
  • Loading branch information
ME1312 committed Aug 20, 2018
1 parent 811cc89 commit 9f88bb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Expand Up @@ -116,6 +116,8 @@ private void stopped(Boolean allowrestart) {

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();
Expand Down
Expand Up @@ -149,6 +149,8 @@ private void run() {

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();
Expand Down

0 comments on commit 9f88bb5

Please sign in to comment.