mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-22 10:15:52 +01:00
Update SubData
This commit is contained in:
parent
c62363bdef
commit
96a3cf797e
@ -43,7 +43,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.ME1312.SubData</groupId>
|
<groupId>net.ME1312.SubData</groupId>
|
||||||
<artifactId>Server</artifactId>
|
<artifactId>Server</artifactId>
|
||||||
<version>20w42a</version>
|
<version>20w46a</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -111,6 +111,6 @@ public class PacketExCreateServer implements PacketObjectIn<Integer>, PacketObje
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int version() {
|
public int version() {
|
||||||
return 0x0002;
|
return 0x0001;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -103,6 +103,6 @@ public class PacketUpdateServer implements PacketObjectIn<Integer>, PacketObject
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int version() {
|
public int version() {
|
||||||
return 0x0002;
|
return 0x0001;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.ME1312.SubData</groupId>
|
<groupId>net.ME1312.SubData</groupId>
|
||||||
<artifactId>Client</artifactId>
|
<artifactId>Client</artifactId>
|
||||||
<version>20w42a</version>
|
<version>20w46a</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -85,6 +85,6 @@ public class PacketUpdateServer implements PacketObjectIn<Integer>, PacketObject
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int version() {
|
public int version() {
|
||||||
return 0x0002;
|
return 0x0001;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ public final class SubPlugin extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void connect(NamedContainer<DisconnectReason, DataClient> disconnect) throws IOException {
|
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)) {
|
if (disconnect == null || (this.reconnect && reconnect > 0 && disconnect.name() != DisconnectReason.PROTOCOL_MISMATCH && disconnect.name() != DisconnectReason.ENCRYPTION_MISMATCH)) {
|
||||||
long reset = resetDate;
|
long reset = resetDate;
|
||||||
if (disconnect != null) Bukkit.getLogger().info("SubData > Attempting reconnect in " + reconnect + " seconds");
|
if (disconnect != null) Bukkit.getLogger().info("SubData > Attempting reconnect in " + reconnect + " seconds");
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.ME1312.SubData</groupId>
|
<groupId>net.ME1312.SubData</groupId>
|
||||||
<artifactId>Client</artifactId>
|
<artifactId>Client</artifactId>
|
||||||
<version>20w42a</version>
|
<version>20w46a</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -84,6 +84,6 @@ public class PacketUpdateServer implements PacketObjectIn<Integer>, PacketObject
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int version() {
|
public int version() {
|
||||||
return 0x0002;
|
return 0x0001;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ public final class SubPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void connect(NamedContainer<DisconnectReason, DataClient> disconnect) throws IOException {
|
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)) {
|
if (disconnect == null || (this.reconnect && reconnect > 0 && disconnect.name() != DisconnectReason.PROTOCOL_MISMATCH && disconnect.name() != DisconnectReason.ENCRYPTION_MISMATCH)) {
|
||||||
long reset = resetDate;
|
long reset = resetDate;
|
||||||
Logger log = LoggerFactory.getLogger("SubData");
|
Logger log = LoggerFactory.getLogger("SubData");
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.ME1312.SubData</groupId>
|
<groupId>net.ME1312.SubData</groupId>
|
||||||
<artifactId>Client</artifactId>
|
<artifactId>Client</artifactId>
|
||||||
<version>20w42a</version>
|
<version>20w46a</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -275,7 +275,7 @@ public final class ExHost {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void connect(java.util.logging.Logger log, NamedContainer<DisconnectReason, DataClient> disconnect) throws IOException {
|
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)) {
|
if (disconnect == null || (this.reconnect && reconnect > 0 && disconnect.name() != DisconnectReason.PROTOCOL_MISMATCH && disconnect.name() != DisconnectReason.ENCRYPTION_MISMATCH)) {
|
||||||
long reset = resetDate;
|
long reset = resetDate;
|
||||||
Timer timer = new Timer(SubAPI.getInstance().getAppInfo().getName() + "::SubData_Reconnect_Handler");
|
Timer timer = new Timer(SubAPI.getInstance().getAppInfo().getName() + "::SubData_Reconnect_Handler");
|
||||||
|
@ -81,7 +81,7 @@ public class SubLoggerImpl {
|
|||||||
@Override
|
@Override
|
||||||
public void run(NamedContainer<DisconnectReason, DataClient> client) {
|
public void run(NamedContainer<DisconnectReason, DataClient> client) {
|
||||||
if (started && SubLoggerImpl.this.process != null && process == SubLoggerImpl.this.process && process.isAlive()) {
|
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
|
if (Util.getDespiteException(() -> Util.reflect(ExHost.class.getDeclaredField("reconnect"), host), false) && reconnect > 0
|
||||||
&& client.name() != DisconnectReason.PROTOCOL_MISMATCH && client.name() != DisconnectReason.ENCRYPTION_MISMATCH) {
|
&& client.name() != DisconnectReason.PROTOCOL_MISMATCH && client.name() != DisconnectReason.ENCRYPTION_MISMATCH) {
|
||||||
Timer timer = new Timer(SubAPI.getInstance().getAppInfo().getName() + "::Log_Reconnect_Handler");
|
Timer timer = new Timer(SubAPI.getInstance().getAppInfo().getName() + "::Log_Reconnect_Handler");
|
||||||
|
@ -104,6 +104,6 @@ public class PacketExCreateServer implements PacketObjectIn<Integer>, PacketObje
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int version() {
|
public int version() {
|
||||||
return 0x0002;
|
return 0x0001;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -84,6 +84,6 @@ public class PacketUpdateServer implements PacketObjectIn<Integer>, PacketObject
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int version() {
|
public int version() {
|
||||||
return 0x0002;
|
return 0x0001;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ public class SubProtocol extends SubDataProtocol {
|
|||||||
|
|
||||||
if (Util.getDespiteException(() -> Util.reflect(ExHost.class.getDeclaredField("running"), host), true)) {
|
if (Util.getDespiteException(() -> Util.reflect(ExHost.class.getDeclaredField("running"), host), true)) {
|
||||||
Logger log = Util.getDespiteException(() -> Util.reflect(SubDataClient.class.getDeclaredField("log"), client.get()), null);
|
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));
|
Util.isException(() -> Util.reflect(ExHost.class.getDeclaredMethod("connect", Logger.class, NamedContainer.class), host, log, client));
|
||||||
} else map.put(0, null);
|
} else map.put(0, null);
|
||||||
});
|
});
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.ME1312.SubData</groupId>
|
<groupId>net.ME1312.SubData</groupId>
|
||||||
<artifactId>Client</artifactId>
|
<artifactId>Client</artifactId>
|
||||||
<version>20w42a</version>
|
<version>20w46a</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -180,7 +180,7 @@ public final class ExProxy extends BungeeCord implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void connect(NamedContainer<DisconnectReason, DataClient> disconnect) throws IOException {
|
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)) {
|
if (disconnect == null || (this.reconnect && reconnect > 0 && disconnect.name() != DisconnectReason.PROTOCOL_MISMATCH && disconnect.name() != DisconnectReason.ENCRYPTION_MISMATCH)) {
|
||||||
long reset = resetDate;
|
long reset = resetDate;
|
||||||
Timer timer = new Timer("SubServers.Sync::SubData_Reconnect_Handler");
|
Timer timer = new Timer("SubServers.Sync::SubData_Reconnect_Handler");
|
||||||
|
@ -84,6 +84,6 @@ public class PacketUpdateServer implements PacketObjectIn<Integer>, PacketObject
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int version() {
|
public int version() {
|
||||||
return 0x0002;
|
return 0x0001;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ public class SubProtocol extends SubDataProtocol {
|
|||||||
plugin.getPluginManager().callEvent(event);
|
plugin.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (plugin.isRunning) {
|
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));
|
Util.isException(() -> Util.reflect(ExProxy.class.getDeclaredMethod("connect", NamedContainer.class), plugin, client));
|
||||||
} else map.put(0, null);
|
} else map.put(0, null);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user