Fix Node debug code changes, Debug messages, script_syntax,
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
1e40decc9e
Commit
8029dd09e9
@ -22,10 +22,7 @@ package de.steamwar.bungeecore;
|
||||
import net.md_5.bungee.BungeeCord;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.*;
|
||||
import java.nio.file.Files;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@ -122,8 +119,6 @@ public abstract class Node {
|
||||
cmd.add(worldDir);
|
||||
cmd.add("--level-name");
|
||||
cmd.add(levelName);
|
||||
cmd.add("--plugins");
|
||||
cmd.add("/home/lixfel/bpl");
|
||||
cmd.add("--port");
|
||||
cmd.add(String.valueOf(port));
|
||||
cmd.add("nogui");
|
||||
|
@ -56,11 +56,11 @@ public class IPSanitizer extends BasicListener {
|
||||
}
|
||||
|
||||
|
||||
private final InetSocketAddress inetSocketAddress = new InetSocketAddress("127.127.127.127", 25565);
|
||||
private final InetSocketAddress sanitized = new InetSocketAddress("127.127.127.127", 25565);
|
||||
|
||||
@EventHandler
|
||||
public void loginEvent(LoginEvent e) {
|
||||
BungeeCore.get().getLogger().log(Level.INFO, e.getConnection().getSocketAddress() + " has logged in with user name " + e.getConnection().getName());
|
||||
getChannelWrapper(e.getConnection()).setRemoteAddress(inetSocketAddress);
|
||||
getChannelWrapper(e.getConnection()).setRemoteAddress(sanitized);
|
||||
}
|
||||
}
|
||||
|
@ -86,6 +86,8 @@ public class PluginMessage extends BasicListener {
|
||||
knownChannels.add("forge:login");
|
||||
knownChannels.add("forge:handshake");
|
||||
|
||||
knownChannels.add(ApolloManager.PLUGIN_MESSAGE_CHANNEL);
|
||||
|
||||
knownChannels.add("Replay|Restrict");
|
||||
knownChannels.add("replaymod:restrict");
|
||||
knownChannels.add("WDL|CONTROL");
|
||||
@ -100,7 +102,6 @@ public class PluginMessage extends BasicListener {
|
||||
register("MC|Brand", false, directional(this::steamWarBrand, this::userBrand));
|
||||
register("minecraft:brand", false, directional(this::steamWarBrand, this::userBrand));
|
||||
|
||||
register("sw:script_syntax", false, directional(onlySWSource(PASS_THROUGH), UNKNOWN));
|
||||
register("sw:bridge", false, directional(onlySWSource(async(event -> NetworkPacket.handle(new ServerMetaInfo(((Server) event.getSender()).getInfo()), event.getData()))), UNKNOWN));
|
||||
register("worldedit:cui", false, PASS_THROUGH);
|
||||
register("fabricmodsender:mods", true, directional(UNKNOWN, fabricModSender::handlePluginMessage));
|
||||
@ -115,6 +116,9 @@ public class PluginMessage extends BasicListener {
|
||||
register("labymod3:main", true, directional(UNKNOWN, async(labyMod::handlePluginMessage)));
|
||||
register(FML.CHANNEL, true, directional(UNKNOWN, async(fml::handlePluginMessage)));
|
||||
|
||||
//vanilla does not register any channels (sends only one minecraft:brand vanilla, nothing else (potential spoofed client detection))
|
||||
//meteor https://github.com/MeteorDevelopment/meteor-client/blob/master/src/main/java/meteordevelopment/meteorclient/systems/modules/misc/ServerSpoof.java https://github.com/MeteorDevelopment/meteor-client/blob/master/src/main/java/meteordevelopment/meteorclient/systems/modules/misc/DiscordPresence.java
|
||||
//feather:client https://github.com/Koupah/Feather-Client-API/blob/main/src/club/koupah/feather/handler/FeatherHandler.java
|
||||
//litematica/malilib https://github.com/maruohon/litematica/issues/75 https://github.com/maruohon/malilib/blob/liteloader_1.12.2/src/main/java/malilib/network/message/ConfigLockPacketHandler.java#L65
|
||||
}
|
||||
|
||||
@ -122,8 +126,6 @@ public class PluginMessage extends BasicListener {
|
||||
public void onPluginMessage(PluginMessageEvent event) {
|
||||
event.setCancelled(true);
|
||||
|
||||
BungeeCore.get().getLogger().log(Level.INFO, event + "\n" + new String(event.getData()) + "\n" + Arrays.toString(event.getData())); //TODO remove logging
|
||||
|
||||
try {
|
||||
handlers.getOrDefault(event.getTag(), UNKNOWN).handle(event);
|
||||
} catch (Exception e) {
|
||||
|
@ -22,6 +22,7 @@ package de.steamwar.bungeecore.mods;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import de.steamwar.bungeecore.BungeeCore;
|
||||
import de.steamwar.sql.Mod;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
@ -31,6 +32,7 @@ import net.md_5.bungee.protocol.DefinedPacket;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class LabyMod {
|
||||
// https://docs.labymod.net/pages/server/introduction/
|
||||
@ -71,9 +73,10 @@ public class LabyMod {
|
||||
}
|
||||
|
||||
if(message.has("mods")) {
|
||||
BungeeCore.get().getLogger().log(Level.WARNING, () -> "LabyMod External Mods for debugging: " + message.getAsJsonArray("mods"));
|
||||
for(JsonElement element : message.getAsJsonArray("mods")) {
|
||||
JsonObject addon = element.getAsJsonObject();
|
||||
//TODO observer, FORGE and FABRIC mods available, do they always and with .jar? (would equal new mod platform)
|
||||
//TODO observe: FORGE and FABRIC mods available, do they always and with .jar? (would equal new mod platform)
|
||||
//mods.add(Mod.getOrCreate(addon.get("name").getAsString().replace(".jar", ""), Mod.Platform.FORGE));
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren