From 32f1b3fe5eca18da0aa124569007a22425b92b6f Mon Sep 17 00:00:00 2001 From: Bunnu_i <37466008+Bunnui@users.noreply.github.com> Date: Thu, 25 Aug 2022 16:02:48 +0800 Subject: [PATCH] Update Messager.java --- .../yan/lx/bedrockminer/utils/Messager.java | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/main/java/yan/lx/bedrockminer/utils/Messager.java b/src/main/java/yan/lx/bedrockminer/utils/Messager.java index b4779c1..f4821fd 100644 --- a/src/main/java/yan/lx/bedrockminer/utils/Messager.java +++ b/src/main/java/yan/lx/bedrockminer/utils/Messager.java @@ -5,25 +5,20 @@ import net.minecraft.text.Text; public class Messager { - public static void actionBar(String message){ - MinecraftClient minecraftClient = MinecraftClient.getInstance(); - minecraftClient.inGameHud.setOverlayMessage(Text.translatable(message),false); + public static void actionBar(String message) { + MinecraftClient.getInstance().inGameHud.setOverlayMessage(Text.translatable(message), false); } - public static void rawactionBar(String message){ - MinecraftClient minecraftClient = MinecraftClient.getInstance(); + + public static void rawactionBar(String message) { Text text = Text.literal(message); - minecraftClient.inGameHud.setOverlayMessage(text,false); + MinecraftClient.getInstance().inGameHud.setOverlayMessage(Text.literal(message), false); } - public static void chat(String message){ - MinecraftClient minecraftClient = MinecraftClient.getInstance(); - minecraftClient.inGameHud.getChatHud().addMessage(Text.translatable(message)); + public static void chat(String message) { + MinecraftClient.getInstance().inGameHud.getChatHud().addMessage(Text.translatable(message)); } - public static void rawchat(String message){ - MinecraftClient minecraftClient = MinecraftClient.getInstance(); - Text text = Text.literal(message); - minecraftClient.inGameHud.getChatHud().addMessage(text); + public static void rawchat(String message) { + MinecraftClient.getInstance().inGameHud.getChatHud().addMessage(Text.literal(message)); } } -