mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-22 10:15:52 +01:00
Remove temporary servers from the config when finished
This commit is contained in:
parent
811cc891a0
commit
9f88bb5099
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user