SteamWar/BungeeCore
Archiviert
13
2

Fix npcs #3
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-06-18 19:01:29 +02:00
Ursprung 78e602fd26
Commit cc6860b0a5

Datei anzeigen

@ -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<PacketWrapper> {
}
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);
}
}