Merge pull request 'Fix ban message showing' (#353) from fixBan into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #353 Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Commit
2203b99d3e
@ -21,6 +21,7 @@ package de.steamwar.bungeecore.listeners;
|
||||
|
||||
import de.steamwar.bungeecore.BungeeCore;
|
||||
import de.steamwar.bungeecore.Message;
|
||||
import de.steamwar.bungeecore.listeners.mods.Forge;
|
||||
import de.steamwar.bungeecore.sql.BannedUserIPs;
|
||||
import de.steamwar.bungeecore.sql.Punishment;
|
||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||
@ -93,7 +94,8 @@ public class BanListener extends BasicListener {
|
||||
}
|
||||
}
|
||||
}
|
||||
event.completeIntent(BungeeCore.get());
|
||||
|
||||
Forge.onServerConnected(event);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -60,9 +60,11 @@ public class Forge extends BasicListener {
|
||||
event.setResponse(new FMLPing(event.getResponse(), event.getConnection().getVersion()));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onServerConnected(LoginEvent event){
|
||||
if(event.getConnection().getVersion() < 341) return; //1.13+
|
||||
public static void onServerConnected(LoginEvent event) {
|
||||
if(event.getConnection().getVersion() < 341) { //1.13+
|
||||
event.completeIntent(BungeeCore.get());
|
||||
return;
|
||||
}
|
||||
|
||||
//fml:handshake without mods, channels and registries
|
||||
//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);
|
||||
} catch (IllegalAccessException e) {
|
||||
BungeeCore.get().getLogger().log(Level.SEVERE, "Could not get Channel", e);
|
||||
event.completeIntent(BungeeCore.get());
|
||||
return;
|
||||
}
|
||||
|
||||
event.registerIntent(BungeeCore.get());
|
||||
ChannelPipeline pipeline = wrapper.getHandle().pipeline();
|
||||
if(pipeline != null) {
|
||||
HandlerBoss handlerBoss = pipeline.get(HandlerBoss.class);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren