mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-22 10:15:52 +01:00
Revert something
This change I made a few commits ago is now unnecessary given the previous commit.
This commit is contained in:
parent
b0340b498e
commit
e090815b37
@ -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;
|
||||
|
@ -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());
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user