SteamWar/BungeeCore
Archiviert
13
2

Fix ban message showing
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-05-18 16:47:38 +02:00
Ursprung 1dedebb3aa
Commit 348aabc99a
2 geänderte Dateien mit 9 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -21,6 +21,7 @@ package de.steamwar.bungeecore.listeners;
import de.steamwar.bungeecore.BungeeCore; import de.steamwar.bungeecore.BungeeCore;
import de.steamwar.bungeecore.Message; import de.steamwar.bungeecore.Message;
import de.steamwar.bungeecore.listeners.mods.Forge;
import de.steamwar.bungeecore.sql.BannedUserIPs; import de.steamwar.bungeecore.sql.BannedUserIPs;
import de.steamwar.bungeecore.sql.Punishment; import de.steamwar.bungeecore.sql.Punishment;
import de.steamwar.bungeecore.sql.SteamwarUser; import de.steamwar.bungeecore.sql.SteamwarUser;
@ -93,7 +94,8 @@ public class BanListener extends BasicListener {
} }
} }
} }
event.completeIntent(BungeeCore.get());
Forge.onServerConnected(event);
}); });
} }
} }

Datei anzeigen

@ -60,9 +60,11 @@ public class Forge extends BasicListener {
event.setResponse(new FMLPing(event.getResponse(), event.getConnection().getVersion())); event.setResponse(new FMLPing(event.getResponse(), event.getConnection().getVersion()));
} }
@EventHandler public static void onServerConnected(LoginEvent event) {
public void onServerConnected(LoginEvent event){ if(event.getConnection().getVersion() < 341) { //1.13+
if(event.getConnection().getVersion() < 341) return; //1.13+ event.completeIntent(BungeeCore.get());
return;
}
//fml:handshake without mods, channels and registries //fml:handshake without mods, channels and registries
//for more information see https://wiki.vg/Minecraft_Forge_Handshake#FML2_protocol_.281.13_-_Current.29 //for more information see https://wiki.vg/Minecraft_Forge_Handshake#FML2_protocol_.281.13_-_Current.29
@ -75,10 +77,10 @@ public class Forge extends BasicListener {
wrapper = (ChannelWrapper) initialHandlerCh.get(handler); wrapper = (ChannelWrapper) initialHandlerCh.get(handler);
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
BungeeCore.get().getLogger().log(Level.SEVERE, "Could not get Channel", e); BungeeCore.get().getLogger().log(Level.SEVERE, "Could not get Channel", e);
event.completeIntent(BungeeCore.get());
return; return;
} }
event.registerIntent(BungeeCore.get());
ChannelPipeline pipeline = wrapper.getHandle().pipeline(); ChannelPipeline pipeline = wrapper.getHandle().pipeline();
if(pipeline != null) { if(pipeline != null) {
HandlerBoss handlerBoss = pipeline.get(HandlerBoss.class); HandlerBoss handlerBoss = pipeline.get(HandlerBoss.class);