Update SubData

This commit is contained in:
ME1312 2020-11-11 16:07:22 -05:00
parent c62363bdef
commit 96a3cf797e
No known key found for this signature in database
GPG Key ID: FEFFE2F698E88FA8
19 changed files with 19 additions and 19 deletions

View File

@ -43,7 +43,7 @@
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Server</artifactId>
<version>20w42a</version>
<version>20w46a</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

View File

@ -111,6 +111,6 @@ public class PacketExCreateServer implements PacketObjectIn<Integer>, PacketObje
@Override
public int version() {
return 0x0002;
return 0x0001;
}
}

View File

@ -103,6 +103,6 @@ public class PacketUpdateServer implements PacketObjectIn<Integer>, PacketObject
@Override
public int version() {
return 0x0002;
return 0x0001;
}
}

View File

@ -55,7 +55,7 @@
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Client</artifactId>
<version>20w42a</version>
<version>20w46a</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

View File

@ -85,6 +85,6 @@ public class PacketUpdateServer implements PacketObjectIn<Integer>, PacketObject
@Override
public int version() {
return 0x0002;
return 0x0001;
}
}

View File

@ -189,7 +189,7 @@ public final class SubPlugin extends JavaPlugin {
}
private void connect(NamedContainer<DisconnectReason, DataClient> disconnect) throws IOException {
int reconnect = config.get().getMap("Settings").getMap("SubData").getInt("Reconnect", 30);
int reconnect = config.get().getMap("Settings").getMap("SubData").getInt("Reconnect", 60);
if (disconnect == null || (this.reconnect && reconnect > 0 && disconnect.name() != DisconnectReason.PROTOCOL_MISMATCH && disconnect.name() != DisconnectReason.ENCRYPTION_MISMATCH)) {
long reset = resetDate;
if (disconnect != null) Bukkit.getLogger().info("SubData > Attempting reconnect in " + reconnect + " seconds");

View File

@ -37,7 +37,7 @@
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Client</artifactId>
<version>20w42a</version>
<version>20w46a</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

View File

@ -84,6 +84,6 @@ public class PacketUpdateServer implements PacketObjectIn<Integer>, PacketObject
@Override
public int version() {
return 0x0002;
return 0x0001;
}
}

View File

@ -203,7 +203,7 @@ public final class SubPlugin {
}
private void connect(NamedContainer<DisconnectReason, DataClient> disconnect) throws IOException {
int reconnect = config.get().getMap("Settings").getMap("SubData").getInt("Reconnect", 30);
int reconnect = config.get().getMap("Settings").getMap("SubData").getInt("Reconnect", 60);
if (disconnect == null || (this.reconnect && reconnect > 0 && disconnect.name() != DisconnectReason.PROTOCOL_MISMATCH && disconnect.name() != DisconnectReason.ENCRYPTION_MISMATCH)) {
long reset = resetDate;
Logger log = LoggerFactory.getLogger("SubData");

View File

@ -27,7 +27,7 @@
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Client</artifactId>
<version>20w42a</version>
<version>20w46a</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

View File

@ -275,7 +275,7 @@ public final class ExHost {
}
private void connect(java.util.logging.Logger log, NamedContainer<DisconnectReason, DataClient> disconnect) throws IOException {
int reconnect = config.get().getMap("Settings").getMap("SubData").getInt("Reconnect", 30);
int reconnect = config.get().getMap("Settings").getMap("SubData").getInt("Reconnect", 60);
if (disconnect == null || (this.reconnect && reconnect > 0 && disconnect.name() != DisconnectReason.PROTOCOL_MISMATCH && disconnect.name() != DisconnectReason.ENCRYPTION_MISMATCH)) {
long reset = resetDate;
Timer timer = new Timer(SubAPI.getInstance().getAppInfo().getName() + "::SubData_Reconnect_Handler");

View File

@ -81,7 +81,7 @@ public class SubLoggerImpl {
@Override
public void run(NamedContainer<DisconnectReason, DataClient> client) {
if (started && SubLoggerImpl.this.process != null && process == SubLoggerImpl.this.process && process.isAlive()) {
int reconnect = host.config.get().getMap("Settings").getMap("SubData").getInt("Reconnect", 30);
int reconnect = host.config.get().getMap("Settings").getMap("SubData").getInt("Reconnect", 60);
if (Util.getDespiteException(() -> Util.reflect(ExHost.class.getDeclaredField("reconnect"), host), false) && reconnect > 0
&& client.name() != DisconnectReason.PROTOCOL_MISMATCH && client.name() != DisconnectReason.ENCRYPTION_MISMATCH) {
Timer timer = new Timer(SubAPI.getInstance().getAppInfo().getName() + "::Log_Reconnect_Handler");

View File

@ -104,6 +104,6 @@ public class PacketExCreateServer implements PacketObjectIn<Integer>, PacketObje
@Override
public int version() {
return 0x0002;
return 0x0001;
}
}

View File

@ -84,6 +84,6 @@ public class PacketUpdateServer implements PacketObjectIn<Integer>, PacketObject
@Override
public int version() {
return 0x0002;
return 0x0001;
}
}

View File

@ -169,7 +169,7 @@ public class SubProtocol extends SubDataProtocol {
if (Util.getDespiteException(() -> Util.reflect(ExHost.class.getDeclaredField("running"), host), true)) {
Logger log = Util.getDespiteException(() -> Util.reflect(SubDataClient.class.getDeclaredField("log"), client.get()), null);
log.info("Attempting reconnect in " + host.config.get().getMap("Settings", new YAMLSection()).getMap("SubData", new YAMLSection()).getInt("Reconnect", 30) + " seconds");
log.info("Attempting reconnect in " + host.config.get().getMap("Settings", new YAMLSection()).getMap("SubData", new YAMLSection()).getInt("Reconnect", 60) + " seconds");
Util.isException(() -> Util.reflect(ExHost.class.getDeclaredMethod("connect", Logger.class, NamedContainer.class), host, log, client));
} else map.put(0, null);
});

View File

@ -43,7 +43,7 @@
<dependency>
<groupId>net.ME1312.SubData</groupId>
<artifactId>Client</artifactId>
<version>20w42a</version>
<version>20w46a</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

View File

@ -180,7 +180,7 @@ public final class ExProxy extends BungeeCord implements Listener {
}
private void connect(NamedContainer<DisconnectReason, DataClient> disconnect) throws IOException {
int reconnect = config.get().getMap("Settings").getMap("SubData").getInt("Reconnect", 30);
int reconnect = config.get().getMap("Settings").getMap("SubData").getInt("Reconnect", 60);
if (disconnect == null || (this.reconnect && reconnect > 0 && disconnect.name() != DisconnectReason.PROTOCOL_MISMATCH && disconnect.name() != DisconnectReason.ENCRYPTION_MISMATCH)) {
long reset = resetDate;
Timer timer = new Timer("SubServers.Sync::SubData_Reconnect_Handler");

View File

@ -84,6 +84,6 @@ public class PacketUpdateServer implements PacketObjectIn<Integer>, PacketObject
@Override
public int version() {
return 0x0002;
return 0x0001;
}
}

View File

@ -199,7 +199,7 @@ public class SubProtocol extends SubDataProtocol {
plugin.getPluginManager().callEvent(event);
if (plugin.isRunning) {
net.ME1312.SubServers.Sync.Library.Compatibility.Logger.get("SubData").info("Attempting reconnect in " + plugin.config.get().getMap("Settings").getMap("SubData").getInt("Reconnect", 30) + " seconds");
net.ME1312.SubServers.Sync.Library.Compatibility.Logger.get("SubData").info("Attempting reconnect in " + plugin.config.get().getMap("Settings").getMap("SubData").getInt("Reconnect", 60) + " seconds");
Util.isException(() -> Util.reflect(ExProxy.class.getDeclaredMethod("connect", NamedContainer.class), plugin, client));
} else map.put(0, null);
});