aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/de/hype/bbsentials/api/Discord.java2
-rw-r--r--src/main/java/de/hype/bbsentials/chat/Chat.java50
-rw-r--r--src/main/java/de/hype/bbsentials/chat/Sender.java4
-rw-r--r--src/main/java/de/hype/bbsentials/client/BBUtils.java2
-rw-r--r--src/main/java/de/hype/bbsentials/client/BBsentials.java14
-rw-r--r--src/main/java/de/hype/bbsentials/client/Commands/CommandsOLD.java2
-rw-r--r--src/main/java/de/hype/bbsentials/client/SplashManager.java4
-rw-r--r--src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java55
-rw-r--r--src/main/java/de/hype/bbsentials/mixins/ItemRendererMixin.java3
-rw-r--r--src/main/java/de/hype/bbsentials/packets/AbstractPacket.java2
-rw-r--r--src/main/java/de/hype/bbsentials/packets/PacketManager.java1
-rw-r--r--src/main/java/de/hype/bbsentials/packets/PacketUtils.java2
-rw-r--r--src/main/java/de/hype/bbsentials/packets/packets/DisplayMessagePacket.java13
13 files changed, 72 insertions, 82 deletions
diff --git a/src/main/java/de/hype/bbsentials/api/Discord.java b/src/main/java/de/hype/bbsentials/api/Discord.java
index e8c8887..3f47439 100644
--- a/src/main/java/de/hype/bbsentials/api/Discord.java
+++ b/src/main/java/de/hype/bbsentials/api/Discord.java
@@ -53,7 +53,7 @@ public class Discord {
}
String responseString = responseBuilder.toString();
- Chat.sendPrivateMessageToSelf(responseString);
+ Chat.sendPrivateMessageToSelfInfo(responseString);
}
response.close();
diff --git a/src/main/java/de/hype/bbsentials/chat/Chat.java b/src/main/java/de/hype/bbsentials/chat/Chat.java
index 1685cf7..73c2ad5 100644
--- a/src/main/java/de/hype/bbsentials/chat/Chat.java
+++ b/src/main/java/de/hype/bbsentials/chat/Chat.java
@@ -71,7 +71,7 @@ public class Chat {
public static void setVariableValue(Object obj, String variableName, String value) throws ClassNotFoundException, NoSuchFieldException, IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException {
if (value == null) {
// Handle null value case
- sendPrivateMessageToSelf(Formatting.RED + "Invalid value: null");
+ sendPrivateMessageToSelfError("Invalid value: null");
return;
}
@@ -94,7 +94,7 @@ public class Chat {
}
// Check and output the value of the variable
- sendPrivateMessageToSelf(Formatting.GREEN + "The variable " + field.getName() + " is now: " + field.get(obj));
+ sendPrivateMessageToSelfSuccess("The variable " + field.getName() + " is now: " + field.get(obj));
}
private static Object parseValue(String value, Class<?> targetType) {
@@ -123,7 +123,7 @@ public class Chat {
Class<?> objClass = object.getClass();
Field field = objClass.getDeclaredField(variableName);
field.setAccessible(true);
- sendPrivateMessageToSelf(Formatting.GREEN + "The variable " + field.getName() + " is: " + field.get(object));
+ sendPrivateMessageToSelfSuccess("The variable " + field.getName() + " is: " + field.get(object));
}
private void init() {
@@ -169,7 +169,7 @@ public class Chat {
String message = messageOriginal.getString().trim();
if (getConfig().messageFromAlreadyReported(message) && getPlayerNameFromMessage(message) != " " && getPlayerNameFromMessage(message) != "") {
System.out.println("Message: " + message);
- sendPrivateMessageToSelf(Formatting.RED + "B: " + message);
+ sendPrivateMessageToSelfBase(Formatting.RED + "B: " + message);
return null;
}
if (getConfig().isDetailedDevModeEnabled()) {
@@ -181,8 +181,8 @@ public class Chat {
if (message.contains("disbanded the party")) {
lastPartyDisbandedMessage = message;
partyDisbandedMap.put(getPlayerNameFromMessage(message), Instant.now());
- if (getConfig().isDevModeEnabled()) {
- sendPrivateMessageToSelf("Watching next 20 Sec for invite: " + getPlayerNameFromMessage(message));
+ if (getConfig().isDevModeEnabled()&&config.acceptReparty) {
+ sendPrivateMessageToSelfDebug("Watching next 20 Sec for invite: " + getPlayerNameFromMessage(message));
}
}
else if (message.contains("invited you to join their party")) {
@@ -245,7 +245,7 @@ public class Chat {
}
else if (message.contains("bb:test")) {
- sendPrivateMessageToSelf(test());
+ sendPrivateMessageToSelfDebug(test());
}
else if ((message.endsWith("is visiting Your Garden !") || message.endsWith("is visiting Your Island !")) && !MinecraftClient.getInstance().isWindowFocused()&& config.doDesktopNotifications) {
sendNotification("BBsentials Visit-Watcher", message);
@@ -270,18 +270,18 @@ public class Chat {
if ((message.contains("Party Leader:") && !message.contains(getConfig().getUsername())) || message.equals("You are not currently in a party.") || (message.contains("warped the party into a Skyblock Dungeon") && !message.startsWith(getConfig().getUsername()) || (!message.startsWith("The party was transferred to " + getConfig().getUsername()) && message.startsWith("The party was transferred to"))) || message.equals(getConfig().getUsername() + " is now a Party Moderator") || (message.equals("The party was disbanded because all invites expired and the party was empty.")) || (message.contains("You have joined ") && message.contains("'s party!")) || (message.contains("Party Leader, ") && message.contains(" , summoned you to their server.")) || (message.contains("warped to your dungeon"))) {
BBsentials.getConfig().setIsLeader(false);
if (getConfig().isDetailedDevModeEnabled()) {
- sendPrivateMessageToSelf("Leader: " + getConfig().isLeader());
+ sendPrivateMessageToSelfDebug("Leader: " + getConfig().isLeader());
}
}
if ((message.equals("Party Leader: " + getConfig().getUsername() + " ●")) || (message.contains(getConfig().getUsername() + " warped the party to a SkyBlock dungeon!")) || message.startsWith("The party was transferred to " + getConfig().getUsername()) || message.equals("Raul_J has promoted " + getConfig().getUsername() + " to Party Leader") || (message.contains("warped to your dungeon"))) {
BBsentials.getConfig().setIsLeader(true);
if (getConfig().isDetailedDevModeEnabled()) {
- sendPrivateMessageToSelf("Leader: " + getConfig().isLeader());
+ sendPrivateMessageToSelfDebug("Leader: " + getConfig().isLeader());
}
}
else if (repartyActive && !BBsentials.getConfig().isLeader()) {
repartyActive = false;
- sendPrivateMessageToSelf("Resetted Reparty is Active since you are not leader ");
+ sendPrivateMessageToSelfInfo("Resetted Reparty is Active since you are not leader ");
}
}
else {
@@ -388,10 +388,28 @@ public class Chat {
return input.replaceAll("\\s+", " ");
}
- public static void sendPrivateMessageToSelf(String message) {
+ public static void sendPrivateMessageToSelfError(String message) {
+ sendPrivateMessageToSelfBase(Formatting.RED + message);
+ }
+ public static void sendPrivateMessageToSelfFatal(String message) {
+ sendPrivateMessageToSelfBase(Formatting.DARK_RED + message);
+ }
+ public static void sendPrivateMessageToSelfSuccess(String message) {
+ sendPrivateMessageToSelfBase(Formatting.GREEN + message);
+ }
+ public static void sendPrivateMessageToSelfInfo(String message) {
+ sendPrivateMessageToSelfBase(Formatting.YELLOW + message);
+ }
+ public static void sendPrivateMessageToSelfImportantInfo(String message) {
+ sendPrivateMessageToSelfBase(Formatting.GOLD + message);
+ }
+ public static void sendPrivateMessageToSelfDebug(String message) {
+ sendPrivateMessageToSelfBase(Formatting.AQUA + message);
+ }
+ private static void sendPrivateMessageToSelfBase(String message) {
MinecraftClient client = MinecraftClient.getInstance();
if (client.player != null) {
- client.player.sendMessage(Text.of((Formatting.RED + message.formatted(Formatting.RED))));
+ client.player.sendMessage(Text.of(Formatting.RED + message));
}
}
@@ -472,7 +490,7 @@ public class Chat {
}
else {
// Handle unrecognized menu argument
- sendPrivateMessageToSelf(Formatting.RED + "Unrecognized menu argument! Do not use this command unless you know exactly what you are doing aka only use it as a developer!");
+ sendPrivateMessageToSelfError("Unrecognized menu argument! Do not use this command unless you know exactly what you are doing aka only use it as a developer!");
return;
}
command = command.replaceAll("@username", username);
@@ -480,7 +498,7 @@ public class Chat {
sendPrivateMessageToSelfText(createClientSideTellraw(command));
}
else {
- sendPrivateMessageToSelf("Invalid message!: " + message);
+ sendPrivateMessageToSelfError("Invalid message!: " + message);
}
}
@@ -502,7 +520,7 @@ public class Chat {
String promptCommand = "/cb " + finalLastPrompt1;
BBsentials.getConfig().setLastChatPromptAnswer(promptCommand);
if (config.isDevModeEnabled()) {
- Chat.sendPrivateMessageToSelf("set the last prompt action too + \""+promptCommand+"\"");
+ Chat.sendPrivateMessageToSelfDebug("set the last prompt action too + \""+promptCommand+"\"");
}
try {
Thread.sleep(10 * 1000);
@@ -523,7 +541,7 @@ public class Chat {
String promptCommand = "/chatprompt " + finalLastPrompt + " YES";
getConfig().setLastChatPromptAnswer(promptCommand);
if (config.isDevModeEnabled()) {
- Chat.sendPrivateMessageToSelf("set the last prompt action too + \""+promptCommand+"\"");
+ Chat.sendPrivateMessageToSelfDebug("set the last prompt action too + \""+promptCommand+"\"");
}
try {
Thread.sleep(10 * 1000);
diff --git a/src/main/java/de/hype/bbsentials/chat/Sender.java b/src/main/java/de/hype/bbsentials/chat/Sender.java
index 4590b5f..eef2469 100644
--- a/src/main/java/de/hype/bbsentials/chat/Sender.java
+++ b/src/main/java/de/hype/bbsentials/chat/Sender.java
@@ -7,7 +7,7 @@ import net.minecraft.util.Formatting;
import java.util.ArrayList;
import java.util.List;
-import static de.hype.bbsentials.chat.Chat.sendPrivateMessageToSelf;
+import static de.hype.bbsentials.chat.Chat.sendPrivateMessageToSelfInfo;
import static de.hype.bbsentials.chat.Chat.sendPrivateMessageToSelfText;
public class Sender {
@@ -99,7 +99,7 @@ public class Sender {
}
MinecraftClient.getInstance().getNetworkHandler().sendChatMessage(toSend);
if (!hidden) {
- sendPrivateMessageToSelf("Sent Command to Server: " + toSend);
+ sendPrivateMessageToSelfInfo("Sent Command to Server: " + toSend);
}
}
}
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 {
diff --git a/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java b/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java
index 33b1777..006772c 100644
--- a/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java
+++ b/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java
@@ -69,8 +69,7 @@ public class BBsentialConnection {
BBsentials.connection.sendCommand("?emergency server-hacked? chchest command " + command);
String emergencyMessage = "We detected that there was a command used which is not configured to be safe! " + command + " please check if its safe. IMMEDIATELY report this to the Admins and Developer Hype_the_Time (@hackthetime). If it is not safe immediately remove BBsentials!!!!!!!! ";
System.out.println(emergencyMessage);
- Chat.sendPrivateMessageToSelf("§4" + emergencyMessage + "\n\n");
- Chat.sendPrivateMessageToSelf("§4" + emergencyMessage + "\n\n");
+ Chat.sendPrivateMessageToSelfFatal("§4" + emergencyMessage + "\n\n");
/*try {
Thread.sleep(5000);
} catch (InterruptedException e) {
@@ -174,7 +173,7 @@ public class BBsentialConnection {
messageReceivedCallback.onMessageReceived(message);
}
else {
- Chat.sendPrivateMessageToSelf("BB: It seemed like you disconnected. Reconnecting...");
+ Chat.sendPrivateMessageToSelfError("BB: It seemed like you disconnected. Reconnecting...");
BBsentials.connectToBBserver();
try {
Thread.sleep(1000 * 10);
@@ -216,17 +215,17 @@ public class BBsentialConnection {
public void sendMessage(String message) {
if (messageQueue != null) {
- Chat.sendPrivateMessageToSelf("§aBBs: " + message);
+ Chat.sendPrivateMessageToSelfDebug("BBs: " + message);
messageQueue.offer(message);
}
else {
- Chat.sendPrivateMessageToSelf("§4BB: It seems like the connection was lost. Please try to reconnect with /bbi reconnect");
+ Chat.sendPrivateMessageToSelfError("BB: It seems like the connection was lost. Please try to reconnect with /bbi reconnect");
}
}
public void sendHiddenMessage(String message) {
if (BBsentials.getConfig().isDetailedDevModeEnabled()) {
- Chat.sendPrivateMessageToSelf("§bBBDev-s: " + message);
+ Chat.sendPrivateMessageToSelfDebug("BBDev-s: " + message);
}
try {
if (socket.isConnected() && writer != null) {
@@ -238,13 +237,13 @@ public class BBsentialConnection {
public void sendCommand(String message) {
if (BBsentials.getConfig().isDetailedDevModeEnabled()) {
- Chat.sendPrivateMessageToSelf("§bBBDev-s: " + message);
+ Chat.sendPrivateMessageToSelfDebug("BBDev-s: " + message);
}
if (socket.isConnected() && writer != null) {
writer.println(message);
}
else {
- Chat.sendPrivateMessageToSelf("§4BB: It seems like the connection was lost. Please try to reconnect with /bbi reconnect");
+ Chat.sendPrivateMessageToSelfFatal("BB: It seems like the connection was lost. Please try to reconnect with /bbi reconnect");
}
}
@@ -254,7 +253,7 @@ public class BBsentialConnection {
if (!PacketUtils.handleIfPacket(this, message)) {
if (message.startsWith("H-")) {
if (message.equals("H-BB-Login: ")) {
- Chat.sendPrivateMessageToSelf("§aLogging into BBsentials-online");
+ Chat.sendPrivateMessageToSelfSuccess("Logging into BBsentials-online");
try {
Thread.sleep(100);
} catch (InterruptedException e) {
@@ -295,11 +294,11 @@ public class BBsentialConnection {
}
}
if (BBsentials.getConfig().isDetailedDevModeEnabled()) {
- Chat.sendPrivateMessageToSelf("BBDev-r: " + message);
+ Chat.sendPrivateMessageToSelfDebug("BBDev-r: " + message);
}
}
else {
- Chat.sendPrivateMessageToSelf("§aBB: " + message);
+ Chat.sendPrivateMessageToSelfSuccess("BB: " + message);
}
}
}
@@ -334,18 +333,18 @@ public class BBsentialConnection {
String packetName = packet.getClass().getSimpleName();
String rawjson = PacketUtils.parsePacketToJson(packet);
if (BBsentials.getConfig().isDetailedDevModeEnabled() && !(packet.getClass().equals(RequestConnectPacket.class))) {
- Chat.sendPrivateMessageToSelf("BBDev-sP: " + packetName + ": " + rawjson);
+ Chat.sendPrivateMessageToSelfDebug("BBDev-sP: " + packetName + ": " + rawjson);
}
if (socket.isConnected() && writer != null) {
writer.println(packetName + "." + rawjson);
}
else {
- Chat.sendPrivateMessageToSelf("BB: Couldn't send a Packet? did you get disconnected?");
+ Chat.sendPrivateMessageToSelfError("BB: Couldn't send a Packet? did you get disconnected?");
}
}
public void onBroadcastMessagePacket(BroadcastMessagePacket packet) {
- Chat.sendPrivateMessageToSelf("§6[A]§r [" + packet.prefix + "] " + packet.username + ": " + packet.message);
+ Chat.sendPrivateMessageToSelfImportantInfo("[A] §r[" + packet.prefix + "§r]§6 " + packet.username + ": " + packet.message);
}
public void onSplashNotifyPacket(SplashNotifyPacket packet) {
@@ -372,7 +371,7 @@ public class BBsentialConnection {
public void onBingoChatMessagePacket(BingoChatMessagePacket packet) {
if (config.showBingoChat) {
- Chat.sendPrivateMessageToSelf("[" + packet.prefix + "] " + packet.username + ": " + packet.message);
+ Chat.sendPrivateMessageToSelfInfo("[" + packet.prefix + "] " + packet.username + ": " + packet.message);
}
}
@@ -388,8 +387,8 @@ public class BBsentialConnection {
}
}
else {
- Chat.sendPrivateMessageToSelf("§cFiltered out a suspicious packet! Please send a screenshot of this message with ping Hype_the_Time (hackthetime) in Bingo Apothecary, BB, SBZ, offical Hypixel,...");
- Chat.sendPrivateMessageToSelf(PacketUtils.parsePacketToJson(packet));
+ Chat.sendPrivateMessageToSelfImportantInfo("§cFiltered out a suspicious packet! Please send a screenshot of this message with ping Hype_the_Time (hackthetime) in Bingo Apothecary, BB, SBZ, offical Hypixel,...");
+ Chat.sendPrivateMessageToSelfImportantInfo(PacketUtils.parsePacketToJson(packet));
}
}
@@ -427,25 +426,25 @@ public class BBsentialConnection {
if (config.toDisplayConfig.goneWithTheWind.equals(Islands.CRYSTAL_HOLLOWS.getDisplayName()) && packet.island.equals(Islands.DWARVEN_MINES))
return;
}
- Chat.sendPrivateMessageToSelf(packet.username + "There is a " + packet.event.getDisplayName() + "in the " + packet.island.getDisplayName() + " now/soon.");
+ Chat.sendPrivateMessageToSelfImportantInfo(packet.username + "There is a " + packet.event.getDisplayName() + "in the " + packet.island.getDisplayName() + " now/soon.");
}
}
public void onWelcomePacket(WelcomeClientPacket packet) {
if (packet.success) {
config.bbsentialsRoles = packet.roles;
- Chat.sendPrivateMessageToSelf("§aLogin Success");
+ Chat.sendPrivateMessageToSelfSuccess("Login Success");
if (!packet.motd.isEmpty()) {
- Chat.sendPrivateMessageToSelf(packet.motd);
+ Chat.sendPrivateMessageToSelfImportantInfo(packet.motd);
}
}
else {
- Chat.sendPrivateMessageToSelf("Login Failed");
+ Chat.sendPrivateMessageToSelfError("Login Failed");
}
}
public void onDisconnectPacket(DisconnectPacket packet) {
- Chat.sendPrivateMessageToSelf(packet.displayMessage);
+ Chat.sendPrivateMessageToSelfError(packet.displayMessage);
for (int i : packet.waitBeforeReconnect) {
executionService.schedule(() -> {
BBsentials.conditionalReconnectToBBserver();
@@ -453,13 +452,9 @@ public class BBsentialConnection {
}
}
- public void onDisplayMessagePacket(DisplayMessagePacket packet) {
- Chat.sendPrivateMessageToSelf("§r" + packet.message);
- }
-
public void onDisplayTellrawMessagePacket(DisplayTellrawMessagePacket packet) {
/*Chat.sendPrivateMessageToSelfText(Chat.createClientSideTellraw(packet.rawJson));*/
- Chat.sendPrivateMessageToSelf("You received a tellraw Packet but it got ignored due too there being no safety checks in this version.");
+ Chat.sendPrivateMessageToSelfImportantInfo("You received a tellraw Packet but it got ignored due too there being no safety checks in this version.");
}
public void onInternalCommandPacket(InternalCommandPacket packet) {
@@ -467,7 +462,7 @@ public class BBsentialConnection {
}
public void onInvalidCommandFeedbackPacket(InvalidCommandFeedbackPacket packet) {
- Chat.sendPrivateMessageToSelf(packet.displayMessage);
+ Chat.sendPrivateMessageToSelfError(packet.displayMessage);
}
public void onPartyPacket(PartyPacket packet) {
@@ -476,10 +471,10 @@ public class BBsentialConnection {
public void onSystemMessagePacket(SystemMessagePacket packet) {
if (packet.important) {
- Chat.sendPrivateMessageToSelf("§c§n" + packet.message);
+ Chat.sendPrivateMessageToSelfImportantInfo("§n" + packet.message);
}
else {
- Chat.sendPrivateMessageToSelf("§r" + packet.message);
+ Chat.sendPrivateMessageToSelfInfo(packet.message);
}
if (packet.ping) {
playsound(SoundEvents.ENTITY_WARDEN_DIG);
diff --git a/src/main/java/de/hype/bbsentials/mixins/ItemRendererMixin.java b/src/main/java/de/hype/bbsentials/mixins/ItemRendererMixin.java
index cfc1c2a..177161f 100644
--- a/src/main/java/de/hype/bbsentials/mixins/ItemRendererMixin.java
+++ b/src/main/java/de/hype/bbsentials/mixins/ItemRendererMixin.java
@@ -1,6 +1,5 @@
package de.hype.bbsentials.mixins;
-import de.hype.bbsentials.chat.Chat;
import de.hype.bbsentials.client.BBsentials;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.VertexConsumerProvider;
@@ -35,8 +34,6 @@ public class ItemRendererMixin {
private void setCustomName(ItemStack stack, String triggerName) {
String temp = stack.getName().getString();
if ((!temp.contains("Splash")) && temp.contains(triggerName)) {
- String tem2 = stack.getNbt().getString("Display");
- Chat.sendPrivateMessageToSelf(tem2);
stack.setCustomName(Text.literal("§6(Bingo Splash) " + temp));
}
}
diff --git a/src/main/java/de/hype/bbsentials/packets/AbstractPacket.java b/src/main/java/de/hype/bbsentials/packets/AbstractPacket.java
index 116c9b2..152e3d8 100644
--- a/src/main/java/de/hype/bbsentials/packets/AbstractPacket.java
+++ b/src/main/java/de/hype/bbsentials/packets/AbstractPacket.java
@@ -20,7 +20,7 @@ public class AbstractPacket {
public boolean isValid(BBsentialConnection connection, String[] allowedNullFields) {
if (isApiSupported(BBsentials.config)) {
- Chat.sendPrivateMessageToSelf("You are using an outdated version of the mod");
+ Chat.sendPrivateMessageToSelfFatal("You are using an outdated version of the mod");
}
return true;
}
diff --git a/src/main/java/de/hype/bbsentials/packets/PacketManager.java b/src/main/java/de/hype/bbsentials/packets/PacketManager.java
index 9c4a6b3..6e1d01c 100644
--- a/src/main/java/de/hype/bbsentials/packets/PacketManager.java
+++ b/src/main/java/de/hype/bbsentials/packets/PacketManager.java
@@ -27,7 +27,6 @@ public class PacketManager {
packets.add(new Packet<>(BroadcastMessagePacket.class, connection::onBroadcastMessagePacket));
packets.add(new Packet<>(ChChestPacket.class, connection::onChChestPacket));
packets.add(new Packet<>(DisconnectPacket.class, connection::onDisconnectPacket));
- packets.add(new Packet<>(DisplayMessagePacket.class, connection::onDisplayMessagePacket));
packets.add(new Packet<>(DisplayTellrawMessagePacket.class, connection::onDisplayTellrawMessagePacket));
// packets.add(new Packet<>(InternalCommandPacket.class, connection::dummy));
packets.add(new Packet<>(InvalidCommandFeedbackPacket.class, connection::onInvalidCommandFeedbackPacket));
diff --git a/src/main/java/de/hype/bbsentials/packets/PacketUtils.java b/src/main/java/de/hype/bbsentials/packets/PacketUtils.java
index 2445e9f..8dcd4d7 100644
--- a/src/main/java/de/hype/bbsentials/packets/PacketUtils.java
+++ b/src/main/java/de/hype/bbsentials/packets/PacketUtils.java
@@ -110,7 +110,7 @@ public class PacketUtils {
for (Packet<? extends AbstractPacket> packet : manager.getPackets()) {
if (!packetName.equals(packet.getClazz().getSimpleName())) continue;
try {
- if (BBsentials.getConfig().isDetailedDevModeEnabled()) Chat.sendPrivateMessageToSelf("§b"+packetName+":"+rawJson);
+ if (BBsentials.getConfig().isDetailedDevModeEnabled()) Chat.sendPrivateMessageToSelfDebug(packetName+":"+rawJson);
tryToProcessPacket(packet, rawJson);
return true;
} catch (Throwable t) {
diff --git a/src/main/java/de/hype/bbsentials/packets/packets/DisplayMessagePacket.java b/src/main/java/de/hype/bbsentials/packets/packets/DisplayMessagePacket.java
deleted file mode 100644
index 9774f38..0000000
--- a/src/main/java/de/hype/bbsentials/packets/packets/DisplayMessagePacket.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package de.hype.bbsentials.packets.packets;
-
-import de.hype.bbsentials.packets.AbstractPacket;
-
-public class DisplayMessagePacket extends AbstractPacket {
-
- public final String message;
-
- public DisplayMessagePacket(String message) {
- super(1, 1); //Min and Max supported Version
- this.message = message;
- }
-}