mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-17 22:28:15 +01:00
#1930: Don't handle upstream packets if no server connected
This commit is contained in:
parent
a605c1acbc
commit
3a0b0aa116
@ -80,15 +80,18 @@ public class UpstreamBridge extends PacketHandler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldHandle(PacketWrapper packet) throws Exception
|
||||||
|
{
|
||||||
|
return con.getServer() != null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(PacketWrapper packet) throws Exception
|
public void handle(PacketWrapper packet) throws Exception
|
||||||
{
|
{
|
||||||
con.getEntityRewrite().rewriteServerbound( packet.buf, con.getClientEntityId(), con.getServerEntityId() );
|
con.getEntityRewrite().rewriteServerbound( packet.buf, con.getClientEntityId(), con.getServerEntityId() );
|
||||||
if ( con.getServer() != null )
|
|
||||||
{
|
|
||||||
con.getServer().getCh().write( packet );
|
con.getServer().getCh().write( packet );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(KeepAlive alive) throws Exception
|
public void handle(KeepAlive alive) throws Exception
|
||||||
|
Loading…
Reference in New Issue
Block a user