mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-21 17:56:16 +01:00
Trigger reconnect sequence for linking errors, too
This commit is contained in:
parent
78f50e77b2
commit
ad24b0deb3
@ -67,7 +67,7 @@ public class InternalSubCreator extends SubCreator {
|
||||
private final LinkedList<String> replace;
|
||||
private final HashMap<String, String> replacements;
|
||||
private final Consumer<SubServer> callback;
|
||||
private Boolean install;
|
||||
private boolean install;
|
||||
private Process process;
|
||||
|
||||
private CreatorTask(UUID player, String name, ServerTemplate template, Version version, int port, Consumer<SubServer> callback) {
|
||||
@ -82,6 +82,7 @@ public class InternalSubCreator extends SubCreator {
|
||||
(this.replace = new LinkedList<String>()).add("/server.properties");
|
||||
this.replacements = new HashMap<String, String>();
|
||||
this.callback = callback;
|
||||
this.install = true;
|
||||
}
|
||||
|
||||
private CreatorTask(UUID player, SubServer server, ServerTemplate template, Version version, Consumer<SubServer> callback) {
|
||||
@ -96,6 +97,7 @@ public class InternalSubCreator extends SubCreator {
|
||||
(this.replace = new LinkedList<String>()).add("/server.properties");
|
||||
this.replacements = new HashMap<String, String>();
|
||||
this.callback = callback;
|
||||
this.install = true;
|
||||
}
|
||||
|
||||
private ObjectMap<String> build(File dir, ServerTemplate template, List<ServerTemplate> history, List<ServerTemplate> stack) throws SubCreatorException {
|
||||
@ -265,7 +267,7 @@ public class InternalSubCreator extends SubCreator {
|
||||
ReplacementScanner replacements = new ReplacementScanner(this.replacements);
|
||||
if (config != null) {
|
||||
try {
|
||||
if (install != Boolean.FALSE) generateClient(dir, template.getType(), name);
|
||||
if (install) generateClient(dir, template.getType(), name);
|
||||
replacements.replace(dir, replace.toArray(new String[0]));
|
||||
} catch (Exception e) {
|
||||
config = null;
|
||||
|
@ -94,7 +94,7 @@ public final class SubProxy extends BungeeCommon implements Listener {
|
||||
public SubDataServer subdata = null;
|
||||
public SubServer sudo = null;
|
||||
public final Collection<Channel> listeners = super.listeners;
|
||||
public static final Version version = Version.fromString("2.19a");
|
||||
public static final Version version = Version.fromString("2.20a");
|
||||
|
||||
public final Proxy mProxy;
|
||||
public boolean canSudo = false;
|
||||
|
@ -75,8 +75,7 @@ public class PacketLinkServer implements InitialPacket, PacketObjectIn<Integer>,
|
||||
Bukkit.getLogger().info("SubData > Use the server \"Name\" option to override auto-linking");
|
||||
}
|
||||
} catch (Exception e) {}
|
||||
new IllegalStateException().printStackTrace();
|
||||
plugin.onDisable();
|
||||
client.getConnection().close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: SubServers-Client-Bukkit
|
||||
main: net.ME1312.SubServers.Client.Bukkit.SubPlugin
|
||||
version: "2.19a"
|
||||
version: "2.20a"
|
||||
authors: ["ME1312"]
|
||||
softdepend: [TitleAPI, PlaceholderAPI]
|
||||
website: "https://github.com/ME1312/SubServers-2"
|
||||
|
@ -79,8 +79,7 @@ public class PacketLinkServer implements InitialPacket, PacketObjectIn<Integer>,
|
||||
log.info("Use the server \"Name\" option to override auto-linking");
|
||||
}
|
||||
} catch (Exception e) {}
|
||||
new IllegalStateException().printStackTrace();
|
||||
plugin.disable(null);
|
||||
client.getConnection().close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ import static net.ME1312.SubServers.Client.Sponge.Library.AccessMode.NO_COMMANDS
|
||||
/**
|
||||
* SubServers Client Plugin Class
|
||||
*/
|
||||
@Plugin(id = "subservers-client-sponge", name = "SubServers-Client-Sponge", authors = "ME1312", version = "2.19a", url = "https://github.com/ME1312/SubServers-2", description = "Take control of the server manager — from your servers")
|
||||
@Plugin(id = "subservers-client-sponge", name = "SubServers-Client-Sponge", authors = "ME1312", version = "2.20a", url = "https://github.com/ME1312/SubServers-2", description = "Take control of the server manager — from your servers")
|
||||
public final class SubPlugin {
|
||||
HashMap<Integer, SubDataClient> subdata = new HashMap<Integer, SubDataClient>();
|
||||
Pair<Long, Map<String, Map<String, String>>> lang = null;
|
||||
|
@ -42,7 +42,7 @@ import java.util.jar.Manifest;
|
||||
/**
|
||||
* SubServers.Host Main Class
|
||||
*/
|
||||
@App(name = "SubServers.Host", version = "2.19a", authors = "ME1312", website = "https://github.com/ME1312/SubServers-2", description = "Host subservers on separate machines")
|
||||
@App(name = "SubServers.Host", version = "2.20a", authors = "ME1312", website = "https://github.com/ME1312/SubServers-2", description = "Host subservers on separate machines")
|
||||
public final class ExHost {
|
||||
HashMap<Integer, SubDataClient> subdata = new HashMap<Integer, SubDataClient>();
|
||||
Pair<Long, Map<String, Map<String, String>>> lang = null;
|
||||
|
@ -272,7 +272,7 @@ public class SubCreatorImpl {
|
||||
private final SubLoggerImpl log;
|
||||
private final LinkedList<String> replace;
|
||||
private final HashMap<String, String> replacements;
|
||||
private Boolean install;
|
||||
private boolean install;
|
||||
private Process process;
|
||||
|
||||
private CreatorTask(UUID player, String name, ServerTemplate template, Version version, int port, Boolean mode, UUID address, UUID tracker) {
|
||||
@ -288,6 +288,7 @@ public class SubCreatorImpl {
|
||||
this.log = new SubLoggerImpl(null, this, name + File.separator + ((update == null)?"Creator":"Updater"), address, new Container<Boolean>(true), null);
|
||||
this.replacements = new HashMap<String, String>();
|
||||
(this.replace = new LinkedList<String>()).add("/server.properties");
|
||||
this.install = true;
|
||||
this.address = address;
|
||||
this.tracker = tracker;
|
||||
|
||||
@ -460,7 +461,7 @@ public class SubCreatorImpl {
|
||||
ReplacementScanner replacements = new ReplacementScanner(this.replacements);
|
||||
if (config != null) {
|
||||
try {
|
||||
if (install != Boolean.FALSE) generateClient(dir, template.getType(), name);
|
||||
if (install) generateClient(dir, template.getType(), name);
|
||||
replacements.replace(dir, replace.toArray(new String[0]));
|
||||
} catch (Exception e) {
|
||||
config = null;
|
||||
|
@ -57,8 +57,7 @@ public class PacketLinkExHost implements InitialPacket, PacketObjectIn<Integer>,
|
||||
setReady(client.getConnection());
|
||||
} else {
|
||||
log.severe("Could not link name with host" + ((data.contains(0x0002))?": "+data.getString(0x0002):'.'));
|
||||
DebugUtil.logException(new IllegalStateException(), log);
|
||||
GalaxiEngine.getInstance().stop();
|
||||
client.getConnection().close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ public final class ExProxy extends BungeeCommon implements Listener {
|
||||
public final SubAPI api = new SubAPI(this);
|
||||
public SubProtocol subprotocol;
|
||||
public final Collection<Channel> listeners = super.listeners;
|
||||
public static final Version version = Version.fromString("2.19a");
|
||||
public static final Version version = Version.fromString("2.20a");
|
||||
|
||||
public final boolean isPatched;
|
||||
public long lastReload = -1;
|
||||
|
@ -65,7 +65,7 @@ public class PacketLinkProxy implements InitialPacket, PacketObjectIn<Integer>,
|
||||
Logger.get("SubData").info("Use the proxy \"Name\" option to override auto-linking");
|
||||
}
|
||||
} catch (Exception e) {}
|
||||
new IllegalStateException().printStackTrace();
|
||||
client.getConnection().close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ import java.nio.charset.Charset;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Plugin(id = "subservers-sync", name = "SubServers-Sync", authors = "ME1312", version = "2.19a", url = "https://github.com/ME1312/SubServers-2", description = "Dynamically sync player and server connection info over multiple proxy instances")
|
||||
@Plugin(id = "subservers-sync", name = "SubServers-Sync", authors = "ME1312", version = "2.20a", url = "https://github.com/ME1312/SubServers-2", description = "Dynamically sync player and server connection info over multiple proxy instances")
|
||||
public class ExProxy {
|
||||
|
||||
HashMap<Integer, SubDataClient> subdata = new HashMap<Integer, SubDataClient>();
|
||||
|
@ -65,7 +65,7 @@ public class PacketLinkProxy implements InitialPacket, PacketObjectIn<Integer>,
|
||||
Logger.get("SubData").info("Use the proxy \"Name\" option to override auto-linking");
|
||||
}
|
||||
} catch (Exception e) {}
|
||||
new IllegalStateException().printStackTrace();
|
||||
client.getConnection().close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user