From 3040b1472c8f6901126fb98b5ba73a9f7e882dcf Mon Sep 17 00:00:00 2001 From: Vankka Date: Fri, 21 Jul 2023 17:07:16 +0300 Subject: [PATCH] Don't force discord serialization for join, leave, death and server switch messages --- .../game/AbstractGameMessageModule.java | 5 ----- .../game/DeathMessageModule.java | 7 ++----- .../game/JoinMessageModule.java | 8 ++++---- .../game/LeaveMessageModule.java | 6 +++--- .../game/ServerSwitchMessageModule.java | 8 ++++---- .../MinecraftToDiscordChatModule.java | 19 +++++++++---------- 6 files changed, 22 insertions(+), 31 deletions(-) diff --git a/common/src/main/java/com/discordsrv/common/messageforwarding/game/AbstractGameMessageModule.java b/common/src/main/java/com/discordsrv/common/messageforwarding/game/AbstractGameMessageModule.java index a8522e2a..bef11c19 100644 --- a/common/src/main/java/com/discordsrv/common/messageforwarding/game/AbstractGameMessageModule.java +++ b/common/src/main/java/com/discordsrv/common/messageforwarding/game/AbstractGameMessageModule.java @@ -35,7 +35,6 @@ import com.discordsrv.common.future.util.CompletableFutureUtil; import com.discordsrv.common.logging.NamedLogger; import com.discordsrv.common.module.type.AbstractModule; import com.discordsrv.common.player.IPlayer; -import net.kyori.adventure.text.Component; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -159,10 +158,6 @@ public abstract class AbstractGameMessageModule, DiscordGuildMessageChannel> sendMessageToChannels( T config, IPlayer player, diff --git a/common/src/main/java/com/discordsrv/common/messageforwarding/game/DeathMessageModule.java b/common/src/main/java/com/discordsrv/common/messageforwarding/game/DeathMessageModule.java index 9d80d42a..d947e588 100644 --- a/common/src/main/java/com/discordsrv/common/messageforwarding/game/DeathMessageModule.java +++ b/common/src/main/java/com/discordsrv/common/messageforwarding/game/DeathMessageModule.java @@ -25,12 +25,11 @@ import com.discordsrv.api.event.bus.EventPriority; import com.discordsrv.api.event.bus.Subscribe; import com.discordsrv.api.event.events.message.forward.game.DeathMessageForwardedEvent; import com.discordsrv.api.event.events.message.receive.game.DeathMessageReceiveEvent; -import com.discordsrv.api.placeholder.FormattedText; import com.discordsrv.common.DiscordSRV; import com.discordsrv.common.component.util.ComponentUtil; -import com.discordsrv.common.config.main.channels.server.DeathMessageConfig; import com.discordsrv.common.config.main.channels.base.BaseChannelConfig; import com.discordsrv.common.config.main.channels.base.server.ServerBaseChannelConfig; +import com.discordsrv.common.config.main.channels.server.DeathMessageConfig; public class DeathMessageModule extends AbstractGameMessageModule { @@ -65,9 +64,7 @@ public class DeathMessageModule extends AbstractGameMessageModule { @@ -69,8 +69,8 @@ public class JoinMessageModule extends AbstractGameMessageModule { @@ -64,8 +64,8 @@ public class LeaveMessageModule extends AbstractGameMessageModule { @@ -65,8 +65,8 @@ public class ServerSwitchMessageModule extends AbstractGameMessageModule, DiscordGuildMessageChannel> sendMessageToChannels( MinecraftToDiscordChatConfig config, @@ -233,6 +223,15 @@ public class MinecraftToDiscordChatModule extends AbstractGameMessageModule