diff options
| author | HacktheTime <l4bg0jb7@duck.com> | 2023-09-26 20:11:31 +0200 |
|---|---|---|
| committer | HacktheTime <l4bg0jb7@duck.com> | 2023-09-26 20:11:31 +0200 |
| commit | 108ef3378b84c66dad76662ffc0d5b8ec8914c51 (patch) | |
| tree | ab07c66e105ac3b00af03bce2f688c027693d964 /src/main/java/de/hype/bbsentials/client | |
| parent | 29f560cc2d3fcaa4e741b4db35af1ed154da9e96 (diff) | |
| download | BBsentials-108ef3378b84c66dad76662ffc0d5b8ec8914c51.tar.gz BBsentials-108ef3378b84c66dad76662ffc0d5b8ec8914c51.tar.bz2 BBsentials-108ef3378b84c66dad76662ffc0d5b8ec8914c51.zip | |
removed DisplayMessagePacket.java due too SystemMessagePacket.java existing and being more useful
reworked the display of messages to have better colors by default. (splitted it up in a lot of different methods)
Diffstat (limited to 'src/main/java/de/hype/bbsentials/client')
4 files changed, 8 insertions, 14 deletions
diff --git a/src/main/java/de/hype/bbsentials/client/BBUtils.java b/src/main/java/de/hype/bbsentials/client/BBUtils.java index 984af72..6fef5d7 100644 --- a/src/main/java/de/hype/bbsentials/client/BBUtils.java +++ b/src/main/java/de/hype/bbsentials/client/BBUtils.java @@ -9,7 +9,7 @@ public class BBUtils { try { String string = MinecraftClient.getInstance().player.networkHandler.getPlayerListEntry("!C-b").getDisplayName().getString(); if (!string.startsWith("Area: ")) { - Chat.sendPrivateMessageToSelf("§4Could not get Area data. Are you in Skyblock?"); + Chat.sendPrivateMessageToSelfError("Could not get Area data. Are you in Skyblock?"); } else { return Islands.getByDisplayName(string.replace("Area: ", "").trim()); diff --git a/src/main/java/de/hype/bbsentials/client/BBsentials.java b/src/main/java/de/hype/bbsentials/client/BBsentials.java index a8e326b..275091e 100644 --- a/src/main/java/de/hype/bbsentials/client/BBsentials.java +++ b/src/main/java/de/hype/bbsentials/client/BBsentials.java @@ -15,7 +15,6 @@ import net.minecraft.client.MinecraftClient; import net.minecraft.client.option.KeyBinding; import net.minecraft.client.util.InputUtil; import net.minecraft.command.CommandSource; -import net.minecraft.util.Formatting; import org.lwjgl.glfw.GLFW; import java.lang.reflect.InvocationTargetException; @@ -51,7 +50,7 @@ public class BBsentials implements ClientModInitializer { */ public static boolean conditionalReconnectToBBserver() { if (!connection.isConnected()) { - Chat.sendPrivateMessageToSelf("Reconnecting"); + Chat.sendPrivateMessageToSelfInfo("Reconnecting"); connectToBBserver(config.connectToBeta); return true; } @@ -82,11 +81,6 @@ public class BBsentials implements ClientModInitializer { bbthread.start(); } - public static void refreshCommands() { - Chat.sendPrivateMessageToSelf("Setting up commands"); - coms = new CommandsOLD(); - } - /** * Runs the mod initializer on the client environment. */ @@ -134,7 +128,7 @@ public class BBsentials implements ClientModInitializer { switch (category) { case "save": getConfig().save(); - sendPrivateMessageToSelf(Formatting.GREEN + "Saved config successfully"); + sendPrivateMessageToSelfSuccess("Saved config successfully"); break; case "load": BBsentials.config = Config.load(); @@ -177,7 +171,7 @@ public class BBsentials implements ClientModInitializer { InstantiationException | InvocationTargetException | NoSuchMethodException e) { - Chat.sendPrivateMessageToSelf("§cInvalid variable or value"); + Chat.sendPrivateMessageToSelfError("Invalid variable or value"); } return 1; }))))) @@ -228,7 +222,7 @@ public class BBsentials implements ClientModInitializer { if (promptKeyBind.wasPressed()) { if (config.getLastChatPromptAnswer() != null) { if (config.isDetailedDevModeEnabled()) { - Chat.sendPrivateMessageToSelf(config.getLastChatPromptAnswer()); + Chat.sendPrivateMessageToSelfDebug(config.getLastChatPromptAnswer()); } MinecraftClient.getInstance().getNetworkHandler().sendChatMessage(config.getLastChatPromptAnswer()); } diff --git a/src/main/java/de/hype/bbsentials/client/Commands/CommandsOLD.java b/src/main/java/de/hype/bbsentials/client/Commands/CommandsOLD.java index 31a283a..ade5711 100644 --- a/src/main/java/de/hype/bbsentials/client/Commands/CommandsOLD.java +++ b/src/main/java/de/hype/bbsentials/client/Commands/CommandsOLD.java @@ -330,7 +330,7 @@ public class CommandsOLD { BBsentials.connection.sendPacket(new MiningEventPacket(event, config.getUsername(), Objects.requireNonNull(BBUtils.getCurrentIsland()))); } catch (Exception e) { - Chat.sendPrivateMessageToSelf("§c" + e.getMessage()); + Chat.sendPrivateMessageToSelfError(e.getMessage()); } return 1; }) diff --git a/src/main/java/de/hype/bbsentials/client/SplashManager.java b/src/main/java/de/hype/bbsentials/client/SplashManager.java index cc33c66..aafec8e 100644 --- a/src/main/java/de/hype/bbsentials/client/SplashManager.java +++ b/src/main/java/de/hype/bbsentials/client/SplashManager.java @@ -24,7 +24,7 @@ public class SplashManager { if (splash != null) { if (splash.alreadyDisplayed) { if (BBsentials.config.showSplashStatusUpdates) { - Chat.sendPrivateMessageToSelf(splash.hubType.getDisplayName() + " #" + splash.hub + " is " + packet.status); + Chat.sendPrivateMessageToSelfImportantInfo(splash.hubType.getDisplayName() + " #" + splash.hub + " is " + packet.status); } } else { @@ -44,7 +44,7 @@ public class SplashManager { where = "Hub"; } BBsentials.connection.splashHighlightItem("HUB #" + splash.hub, 20); - Chat.sendPrivateMessageToSelf("§6" + splash.splasherUsername + " is Splashing in " + where + " #" + splash.hub + " at " + splash.location + ":" + splash.extraMessage); + Chat.sendPrivateMessageToSelfImportantInfo(splash.splasherUsername + " is Splashing in " + where + " #" + splash.hub + " at " + splash.location + ":" + splash.extraMessage); } private static class DisplaySplash extends SplashNotifyPacket { |
