Update CommonCore, kick Litematica, kick MiniMaps
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
9572347419
Commit
457b787179
@ -1 +1 @@
|
||||
Subproject commit a473e59048a73aae4b40ecb5d6d6b79f0791a138
|
||||
Subproject commit 20c22c47f940c4510de17594b28eb0a96cb9da0c
|
@ -21,6 +21,7 @@ package de.steamwar.bungeecore.listeners;
|
||||
|
||||
import com.lunarclient.apollo.ApolloManager;
|
||||
import de.steamwar.bungeecore.BungeeCore;
|
||||
import de.steamwar.bungeecore.Message;
|
||||
import de.steamwar.bungeecore.commands.TeamCommand;
|
||||
import de.steamwar.bungeecore.mods.*;
|
||||
import de.steamwar.bungeecore.network.ServerMetaInfo;
|
||||
@ -41,6 +42,7 @@ import net.md_5.bungee.event.EventHandler;
|
||||
import net.md_5.bungee.protocol.DefinedPacket;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class PluginMessage extends BasicListener {
|
||||
@ -62,7 +64,7 @@ public class PluginMessage extends BasicListener {
|
||||
private final Lunar lunar = new Lunar();
|
||||
|
||||
private final Set<String> knownBrands = new HashSet<>();
|
||||
private final Set<String> knownChannels = new HashSet<>();
|
||||
private final Map<String, Consumer<ProxiedPlayer>> channelRegisterHandlers = new HashMap<>();
|
||||
private final Map<String, Parser> handlers = new HashMap<>();
|
||||
|
||||
public PluginMessage() {
|
||||
@ -73,21 +75,20 @@ public class PluginMessage extends BasicListener {
|
||||
|
||||
knownBrands.addAll(Arrays.asList("vanilla", "fabric", "quilt", "forge", "optifine", "Geyser", "labymod"));
|
||||
|
||||
knownChannels.addAll(Arrays.asList(
|
||||
for(String channel : Arrays.asList(
|
||||
"fabric:container/open", "fabric:registry/sync/direct", "fabric:registry/sync",
|
||||
"fabric-screen-handler-api-v1:open_screen",
|
||||
|
||||
FML.CHANNEL, "fml:loginwrapper", "fml:handshake", "fml:play", "forge:tier_sorting", "forge:split",
|
||||
"forge:login", "forge:handshake",
|
||||
|
||||
ApolloManager.PLUGIN_MESSAGE_CHANNEL, "labymod3:main", "labymod:neo",
|
||||
"labymod3:main", "labymod:neo",
|
||||
|
||||
"floodgate:skin", "floodgate:form", "floodgate:transfer", "floodgate:packet",
|
||||
|
||||
"Replay|Restrict", "replaymod:restrict",
|
||||
"WDL|CONTROL", "wdl:control",
|
||||
"tpshud:handshake", "tpshud:tps", //https://github.com/mooziii/tpshud-fabric/tree/main
|
||||
"xaerominimap:main",
|
||||
"methane_server:statepacket", //https://modrinth.com/mod/methane
|
||||
"servux:structures", //https://modrinth.com/mod/servux
|
||||
"architectury:spawn_entity_packet", //https://modrinth.com/mod/architectury-api
|
||||
@ -101,7 +102,14 @@ public class PluginMessage extends BasicListener {
|
||||
//https://github.com/Noxcrew/noxesium
|
||||
"noxesium-v1:reset", "noxesium-v1:change_server_rules", "noxesium-v1:server_info",
|
||||
"noxesium-v1:mcc_server", "noxesium-v1:mcc_game_state", "noxesium-v1:reset_server_rules"
|
||||
));
|
||||
))
|
||||
channelRegisterHandlers.put(channel, player -> {});
|
||||
|
||||
channelRegisterHandlers.put(ApolloManager.PLUGIN_MESSAGE_CHANNEL, lunar::sendRestrictions);
|
||||
channelRegisterHandlers.put("xaerominimap:main", player -> player.sendMessage(ChatMessageType.SYSTEM, new TextComponent("§n§o§m§i§n§i§m§a§p"))); //https://www.curseforge.com/minecraft/mc-mods/xaeros-minimap
|
||||
channelRegisterHandlers.put("litemoretica:init_easy_place", player -> player.disconnect(ChatSender.of(player).parseToComponent(false, new Message("MOD_YELLOW_SING", "litematica")))); //https://github.com/Earthcomputer/litemoretica/tree/master
|
||||
channelRegisterHandlers.put("voxelmap:settings", player -> player.disconnect(ChatSender.of(player).parseToComponent(false, new Message("MOD_YELLOW_SING", "voxelmap")))); //https://modrinth.com/mod/voxelmap-updated undocumented
|
||||
channelRegisterHandlers.put("worldinfo:world_id", player -> player.disconnect(ChatSender.of(player).parseToComponent(false, new Message("MOD_YELLOW_SING", "minimap")))); // JourneyMap and VoxelMap
|
||||
|
||||
registerBiDirPassthrough("worldedit:cui");
|
||||
|
||||
@ -167,7 +175,7 @@ public class PluginMessage extends BasicListener {
|
||||
|
||||
private void registerPassthroughToClient(String... channels) {
|
||||
for(String channel : channels) {
|
||||
knownChannels.add(channel);
|
||||
channelRegisterHandlers.put(channel, player -> {});
|
||||
register(channel, false, directional(PASS_THROUGH, UNKNOWN));
|
||||
}
|
||||
}
|
||||
@ -179,7 +187,7 @@ public class PluginMessage extends BasicListener {
|
||||
|
||||
private void registerBiDirPassthrough(String... channels) {
|
||||
for(String channel : channels) {
|
||||
knownChannels.add(channel);
|
||||
channelRegisterHandlers.put(channel, player -> {});
|
||||
register(channel, false, PASS_THROUGH);
|
||||
}
|
||||
}
|
||||
@ -194,13 +202,7 @@ public class PluginMessage extends BasicListener {
|
||||
ProxiedPlayer player = (ProxiedPlayer) event.getSender();
|
||||
|
||||
for(String channel : new String(event.getData()).split("\0")) {
|
||||
if(channel.equals(ApolloManager.PLUGIN_MESSAGE_CHANNEL))
|
||||
lunar.sendRestrictions(player);
|
||||
else if(channel.equals("xaerominimap:main"))
|
||||
player.sendMessage(ChatMessageType.SYSTEM, new TextComponent("§n§o§m§i§n§i§m§a§p")); // https://www.curseforge.com/minecraft/mc-mods/xaeros-minimap
|
||||
|
||||
if(!knownChannels.contains(channel))
|
||||
BungeeCore.get().getLogger().log(Level.WARNING, () -> player.getName() + " registered unknown channel " + channel);
|
||||
channelRegisterHandlers.getOrDefault(channel, p -> BungeeCore.get().getLogger().log(Level.WARNING, () -> p.getName() + " registered unknown channel " + channel)).accept(player);
|
||||
}
|
||||
|
||||
PASS_THROUGH.handle(event);
|
||||
@ -218,12 +220,11 @@ public class PluginMessage extends BasicListener {
|
||||
ProxiedPlayer player = (ProxiedPlayer) event.getSender();
|
||||
ByteBuf buf = Unpooled.wrappedBuffer(event.getData());
|
||||
String brand = DefinedPacket.readString(buf);
|
||||
boolean lunarclient = brand.startsWith("lunarclient:");
|
||||
|
||||
if(brand.startsWith("lunarclient:")) {
|
||||
BungeeCore.get().getLogger().log(knownBrands.contains(brand) || lunarclient ? Level.INFO : Level.WARNING, () -> player.getName() + " joins with brand: " + brand);
|
||||
if(lunarclient)
|
||||
lunar.sendRestrictions(player);
|
||||
} else if(!knownBrands.contains(brand)) {
|
||||
BungeeCore.get().getLogger().log(Level.WARNING, () -> player.getName() + " joined with unknown brand " + brand);
|
||||
}
|
||||
|
||||
PASS_THROUGH.handle(event);
|
||||
}
|
||||
|
@ -54,6 +54,7 @@ public class ModUtils {
|
||||
public static boolean handleMods(UUID uuid, Locale locale, Consumer<BaseComponent> disconnect, List<Mod> mods){
|
||||
SteamwarUser user = SteamwarUser.get(uuid);
|
||||
playerModMap.put(uuid,new ArrayList<>(mods));
|
||||
BungeeCore.get().getLogger().log(Level.INFO, user.getUserName() + " declares mods: " + mods.stream().map(mod -> mod.getPlatform() + ":" + mod.getModName()).collect(Collectors.joining(" ")));
|
||||
|
||||
ModType max = ModType.YELLOW;
|
||||
Iterator<Mod> it = mods.iterator();
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren