Revert something

This change I made a few commits ago is now unnecessary given the previous commit.
This commit is contained in:
ME1312 2021-01-29 19:23:58 -05:00
parent b0340b498e
commit e090815b37
No known key found for this signature in database
GPG Key ID: FEFFE2F698E88FA8
5 changed files with 5 additions and 20 deletions

View File

@ -157,10 +157,7 @@ public class SubProtocol extends SubDataProtocol {
subdata.on.closed(server -> plugin.subdata = null);
subdata.on.connect(client -> {
if (!plugin.getPluginManager().callEvent(new SubNetworkConnectEvent(client.getServer(), client)).isCancelled()) {
client.on.ready(c -> {
((SubDataClient) c).setBlockSize((int) DataSize.KBB);
plugin.getPluginManager().callEvent(new SubNetworkLoginEvent(c.getServer(), c));
});
client.on.ready(c -> plugin.getPluginManager().callEvent(new SubNetworkLoginEvent(c.getServer(), c)));
client.on.closed(c -> plugin.getPluginManager().callEvent(new SubNetworkDisconnectEvent(c.value().getServer(), c.value(), c.key())));
return true;
} else return false;

View File

@ -166,10 +166,7 @@ public class SubProtocol extends SubDataProtocol {
subdata.sendPacket(new PacketLinkServer(plugin, 0));
subdata.sendPacket(new PacketDownloadLang());
subdata.on.ready(client -> {
((SubDataClient) client).setBlockSize((int) DataSize.KBB);
Bukkit.getPluginManager().callEvent(new SubNetworkConnectEvent((SubDataClient) client));
});
subdata.on.ready(client -> Bukkit.getPluginManager().callEvent(new SubNetworkConnectEvent((SubDataClient) client)));
subdata.on.closed(client -> {
SubNetworkDisconnectEvent event = new SubNetworkDisconnectEvent(client.value(), client.key());

View File

@ -173,10 +173,7 @@ public class SubProtocol extends SubDataProtocol {
SubDataClient subdata = super.open(scheduler, logger, address, port);
subdata.sendPacket(new PacketLinkServer(plugin, 0));
subdata.sendPacket(new PacketDownloadLang());
subdata.on.ready(client -> {
((SubDataClient) client).setBlockSize((int) DataSize.KBB);
Sponge.getEventManager().post(new SubNetworkConnectEvent((SubDataClient) client));
});
subdata.on.ready(client -> Sponge.getEventManager().post(new SubNetworkConnectEvent((SubDataClient) client)));
subdata.on.closed(client -> {
SubNetworkDisconnectEvent event = new SubNetworkDisconnectEvent(client.value(), client.key());
Sponge.getEventManager().post(event);

View File

@ -164,10 +164,7 @@ public class SubProtocol extends SubDataProtocol {
subdata.sendPacket(new PacketExDownloadTemplates(host));
subdata.sendPacket(new PacketDownloadLang());
subdata.sendPacket(new PacketOutExRequestQueue());
subdata.on.ready(client -> {
((SubDataClient) client).setBlockSize((int) DataSize.KBB);
host.engine.getPluginManager().executeEvent(new SubNetworkConnectEvent((SubDataClient) client));
});
subdata.on.ready(client -> host.engine.getPluginManager().executeEvent(new SubNetworkConnectEvent((SubDataClient) client)));
subdata.on.closed(client -> {
SubNetworkDisconnectEvent event = new SubNetworkDisconnectEvent(client.value(), client.key());
host.engine.getPluginManager().executeEvent(event);

View File

@ -200,10 +200,7 @@ public class SubProtocol extends SubDataProtocol {
});
}));
subdata.on.ready(client -> {
((SubDataClient) client).setBlockSize((int) DataSize.KBB);
plugin.getPluginManager().callEvent(new SubNetworkConnectEvent((SubDataClient) client));
});
subdata.on.ready(client -> plugin.getPluginManager().callEvent(new SubNetworkConnectEvent((SubDataClient) client)));
subdata.on.closed(client -> {
SubNetworkDisconnectEvent event = new SubNetworkDisconnectEvent(client.value(), client.key());
plugin.getPluginManager().callEvent(event);