SteamWar/BungeeCore
Archiviert
13
2

Merge remote-tracking branch 'origin/Teamserver' into Teamserver
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-04-13 22:31:13 +02:00
Commit 3e315ece3b

Datei anzeigen

@ -22,6 +22,7 @@ package de.steamwar.bungeecore.listeners.mods;
import de.steamwar.bungeecore.BungeeCore; import de.steamwar.bungeecore.BungeeCore;
import de.steamwar.bungeecore.listeners.BasicListener; import de.steamwar.bungeecore.listeners.BasicListener;
import de.steamwar.bungeecore.sql.Mod; import de.steamwar.bungeecore.sql.Mod;
import io.netty.channel.ChannelPipeline;
import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.connection.PendingConnection; import net.md_5.bungee.api.connection.PendingConnection;
import net.md_5.bungee.api.event.LoginEvent; import net.md_5.bungee.api.event.LoginEvent;
@ -78,7 +79,12 @@ public class Forge extends BasicListener {
} }
event.registerIntent(BungeeCore.get()); event.registerIntent(BungeeCore.get());
wrapper.getHandle().pipeline().get(HandlerBoss.class).setHandler(new CustomPacketHandler(event)); ChannelPipeline pipeline = wrapper.getHandle().pipeline();
if(pipeline != null) {
HandlerBoss handlerBoss = pipeline.get(HandlerBoss.class);
if(handlerBoss != null)
handlerBoss.setHandler(new CustomPacketHandler(event));
}
} }
private static class CustomPacketHandler extends PacketHandler { private static class CustomPacketHandler extends PacketHandler {