mirror of
https://github.com/ME1312/SubServers-2.git
synced 2025-01-25 17:11:20 +01:00
SubData API updates & usage optimizations
This commit is contained in:
parent
6d32f1b6a0
commit
b0340b498e
@ -50,7 +50,7 @@
|
||||
<dependency>
|
||||
<groupId>net.ME1312.SubData</groupId>
|
||||
<artifactId>Server</artifactId>
|
||||
<version>21w05b</version>
|
||||
<version>21w05d</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
@ -38,10 +38,8 @@ public class PacketExDownloadTemplates implements PacketIn, PacketStreamOut {
|
||||
@Override
|
||||
public void send(SubDataClient client, OutputStream stream) throws Throwable {
|
||||
try {
|
||||
int initial = client.getBlockSize();
|
||||
client.setBlockSize(DataSize.MBB);
|
||||
if (client.getBlockSize() < DataSize.MBB) client.tempBlockSize(DataSize.MBB);
|
||||
Util.zip(new UniversalFile(plugin.dir, "SubServers:Templates"), stream);
|
||||
client.setBlockSize(initial);
|
||||
stream.close();
|
||||
|
||||
Util.isException(() -> Util.reflect(ExternalSubCreator.class.getDeclaredField("enableRT"), host.getCreator(), true));
|
||||
|
@ -30,7 +30,6 @@ public class SubProtocol extends SubDataProtocol {
|
||||
|
||||
setName("SubServers 2");
|
||||
setVersion(new Version("2.16a+"));
|
||||
setBlockSize(DataSize.MB);
|
||||
|
||||
|
||||
// 00-0F: Object Link Packets
|
||||
|
@ -62,7 +62,7 @@
|
||||
<dependency>
|
||||
<groupId>net.ME1312.SubData</groupId>
|
||||
<artifactId>Client</artifactId>
|
||||
<version>21w05b</version>
|
||||
<version>21w05d</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
@ -36,7 +36,6 @@ public class SubProtocol extends SubDataProtocol {
|
||||
|
||||
setName("SubServers 2");
|
||||
addVersion(new Version("2.16a+"));
|
||||
setBlockSize(DataSize.MB);
|
||||
|
||||
|
||||
// 00-0F: Object Link Packets
|
||||
|
@ -26,7 +26,7 @@
|
||||
<dependency>
|
||||
<groupId>net.ME1312.SubData</groupId>
|
||||
<artifactId>Client</artifactId>
|
||||
<version>21w05b</version>
|
||||
<version>21w05d</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -44,7 +44,7 @@
|
||||
<dependency>
|
||||
<groupId>net.ME1312.SubData</groupId>
|
||||
<artifactId>Client</artifactId>
|
||||
<version>21w05b</version>
|
||||
<version>21w05d</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
@ -39,7 +39,6 @@ public class SubProtocol extends SubDataProtocol {
|
||||
|
||||
setName("SubServers 2");
|
||||
addVersion(new Version("2.16a+"));
|
||||
setBlockSize(DataSize.MB);
|
||||
|
||||
|
||||
// 00-0F: Object Link Packets
|
||||
|
@ -34,7 +34,7 @@
|
||||
<dependency>
|
||||
<groupId>net.ME1312.SubData</groupId>
|
||||
<artifactId>Client</artifactId>
|
||||
<version>21w05b</version>
|
||||
<version>21w05d</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
@ -78,7 +78,7 @@ public class SubLoggerImpl {
|
||||
Process process = this.process;
|
||||
ExHost host = SubAPI.getInstance().getInternals();
|
||||
if (logn) Util.isException(() -> {
|
||||
channel = (SubDataClient) SubAPI.getInstance().getSubDataNetwork()[0].openChannel();
|
||||
channel = (SubDataClient) SubAPI.getInstance().getSubDataNetwork()[0].newChannel();
|
||||
channel.on.closed(new Callback<Pair<DisconnectReason, DataClient>>() {
|
||||
@Override
|
||||
public void run(Pair<DisconnectReason, DataClient> client) {
|
||||
@ -95,7 +95,7 @@ public class SubLoggerImpl {
|
||||
if (!started || SubLoggerImpl.this.process == null || process != SubLoggerImpl.this.process || !process.isAlive()) {
|
||||
timer.cancel();
|
||||
} else try {
|
||||
SubDataClient open = (SubDataClient) SubAPI.getInstance().getSubDataNetwork()[0].openChannel();
|
||||
SubDataClient open = (SubDataClient) SubAPI.getInstance().getSubDataNetwork()[0].newChannel();
|
||||
open.on.closed(run);
|
||||
channel = open;
|
||||
timer.cancel();
|
||||
|
@ -34,7 +34,6 @@ public class SubProtocol extends SubDataProtocol {
|
||||
|
||||
setName("SubServers 2");
|
||||
addVersion(new Version("2.16a+"));
|
||||
setBlockSize(DataSize.MB);
|
||||
|
||||
|
||||
// 00-0F: Object Link Packets
|
||||
|
@ -57,7 +57,7 @@
|
||||
<dependency>
|
||||
<groupId>net.ME1312.SubData</groupId>
|
||||
<artifactId>Client</artifactId>
|
||||
<version>21w05b</version>
|
||||
<version>21w05d</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
@ -43,7 +43,6 @@ public class SubProtocol extends SubDataProtocol {
|
||||
|
||||
setName("SubServers 2");
|
||||
addVersion(new Version("2.16a+"));
|
||||
setBlockSize(DataSize.MB);
|
||||
|
||||
|
||||
// 00-0F: Object Link Packets
|
||||
|
Loading…
Reference in New Issue
Block a user