diff --git a/src/de/steamwar/bungeecore/tablist/Tablist.java b/src/de/steamwar/bungeecore/tablist/Tablist.java index be8d9201..1aca15a5 100644 --- a/src/de/steamwar/bungeecore/tablist/Tablist.java +++ b/src/de/steamwar/bungeecore/tablist/Tablist.java @@ -23,6 +23,7 @@ import de.steamwar.bungeecore.Storage; import de.steamwar.messages.ChatSender; import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelPipeline; import io.netty.handler.codec.MessageToMessageDecoder; import net.md_5.bungee.ServerConnection; import net.md_5.bungee.api.ProxyServer; @@ -152,7 +153,11 @@ public class Tablist extends MessageToMessageDecoder { } if(connection != null) { - connection.getCh().getHandle().pipeline().addBefore(PipelineUtils.BOSS_HANDLER, "steamwar-tablist", this); + ChannelPipeline pipeline = connection.getCh().getHandle().pipeline(); + if(pipeline.get("steamwar-tablist") != null) //Catch unclean exit + pipeline.remove("steamwar-tablist"); + + pipeline.addBefore(PipelineUtils.BOSS_HANDLER, "steamwar-tablist", this); player.unsafe().sendPacket(teamPacket); } }