Skip to content

Commit 88b3352

Browse files
committed
fix: properly escape the backslash when we have styled chat
1 parent 5ef9aac commit 88b3352

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

buildSrc/src/main/kotlin/net/modgarden/flowerbed/gradle/Properties.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package net.modgarden.flowerbed.gradle
22

33
object Properties {
4-
const val MOD_VERSION = "0.5.0"
4+
const val MOD_VERSION = "0.5.1"
55
const val JAVA_VERSION = 21
66

77
const val GROUP = "net.modgarden"

src/client/java/net/modgarden/flowerbed/client/command/FlowerbedClientCommands.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.mojang.brigadier.arguments.StringArgumentType;
44
import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager;
55
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
6+
import net.fabricmc.loader.api.FabricLoader;
67
import net.minecraft.client.multiplayer.ClientPacketListener;
78
import net.minecraft.network.chat.Component;
89

@@ -19,7 +20,11 @@ public static void init() {
1920
ctx.getSource().sendError(Component.translatable("commands.flowerbed.shrug.failed.no_server"));
2021
return 0;
2122
}
22-
connection.sendChat(message + " ¯\\_(ツ)_/¯");
23+
if (FabricLoader.getInstance().isModLoaded("styledchat")) {
24+
connection.sendChat(message + " ¯\\\\_(ツ)_/¯");
25+
} else {
26+
connection.sendChat(message + " ¯\\_(ツ)_/¯");
27+
}
2328
return 1;
2429
}))
2530
));

0 commit comments

Comments
 (0)