mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Clean up stale references to the Player stored in the NetworkRegistry,
closes #100
This commit is contained in:
1 parent
7299e05fe1
commit
6394ee8714
5 files changed
+7
-6
No files matched your search
@@ -304,9 +304,9 @@ public class FMLNetworkHandler
|
||||
NetworkRegistry.instance().connectionOpened(netClientHandler, server, networkManager);
|
||||
}
|
||||
|
||||
public static void onConnectionClosed(NetworkManager manager)
|
||||
public static void onConnectionClosed(NetworkManager manager, EntityPlayer player)
|
||||
{
|
||||
NetworkRegistry.instance().connectionClosed(manager);
|
||||
NetworkRegistry.instance().connectionClosed(manager, player);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -207,12 +207,13 @@ public class NetworkRegistry
|
||||
}
|
||||
}
|
||||
|
||||
void connectionClosed(NetworkManager manager)
|
||||
void connectionClosed(NetworkManager manager, EntityPlayer player)
|
||||
{
|
||||
for (IConnectionHandler handler : connectionHandlers)
|
||||
{
|
||||
handler.connectionClosed(manager);
|
||||
}
|
||||
activeChannels.removeAll(player);
|
||||
}
|
||||
|
||||
void generateChannelRegistration(EntityPlayer player, NetHandler netHandler, NetworkManager manager)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
if (this.field_74472_n && this.field_74473_o.isEmpty())
|
||||
{
|
||||
this.field_74485_r.func_72515_a(this.field_74481_v, this.field_74480_w);
|
||||
+ FMLNetworkHandler.onConnectionClosed(this);
|
||||
+ FMLNetworkHandler.onConnectionClosed(this, this.field_74485_r.getPlayer());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
if (this.field_74441_e && this.field_74442_b.isEmpty())
|
||||
{
|
||||
this.field_74440_d.func_72515_a(this.field_74438_f, this.field_74439_g);
|
||||
+ FMLNetworkHandler.onConnectionClosed(this);
|
||||
+ FMLNetworkHandler.onConnectionClosed(this, this.field_74440_d.getPlayer());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
{
|
||||
this.field_72555_g.func_74429_a(p_72546_1_);
|
||||
this.field_72555_g.func_74423_d();
|
||||
+ FMLNetworkHandler.onConnectionClosed(this.field_72555_g);
|
||||
+ FMLNetworkHandler.onConnectionClosed(this.field_72555_g, this.getPlayer());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user