Skip to content

Commit

Permalink
Merge pull request #897 from viciscat/chat-rules-changes
Browse files Browse the repository at this point in the history
Chat rules thingamabobs
  • Loading branch information
AzureAaron authored Aug 15, 2024
2 parents 931898c + 1d060da commit 9fc0b3c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 58 deletions.
2 changes: 0 additions & 2 deletions src/main/java/de/hysky/skyblocker/SkyblockerMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import de.hysky.skyblocker.skyblock.*;
import de.hysky.skyblocker.skyblock.bazaar.BazaarHelper;
import de.hysky.skyblocker.skyblock.calculators.CalculatorCommand;
import de.hysky.skyblocker.skyblock.chat.ChatRuleAnnouncementScreen;
import de.hysky.skyblocker.skyblock.chat.ChatRulesHandler;
import de.hysky.skyblocker.skyblock.chat.SkyblockXpMessages;
import de.hysky.skyblocker.skyblock.chocolatefactory.EggFinder;
Expand Down Expand Up @@ -146,7 +145,6 @@ public void onInitializeClient() {
ChatMessageListener.init();
Shortcuts.init();
ChatRulesHandler.init();
ChatRuleAnnouncementScreen.init();
SkyblockXpMessages.init();
CalculatorCommand.init();
DiscordRPCManager.init();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package de.hysky.skyblocker.skyblock.chat;

import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.mojang.serialization.Codec;
import com.mojang.serialization.JsonOps;
import de.hysky.skyblocker.SkyblockerMod;
import de.hysky.skyblocker.mixins.accessors.MessageHandlerAccessor;
import de.hysky.skyblocker.utils.Http;
import de.hysky.skyblocker.utils.Location;
import de.hysky.skyblocker.config.SkyblockerConfigManager;
import de.hysky.skyblocker.utils.Utils;
import de.hysky.skyblocker.utils.render.title.Title;
import de.hysky.skyblocker.utils.render.title.TitleContainer;
import net.fabricmc.fabric.api.client.message.v1.ClientReceiveMessageEvents;
import net.minecraft.client.MinecraftClient;
import net.minecraft.sound.SoundEvents;
Expand All @@ -25,7 +24,6 @@
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
import java.nio.file.Path;
import java.time.Instant;
import java.util.*;
import java.util.concurrent.CompletableFuture;

Expand Down Expand Up @@ -123,7 +121,7 @@ private static boolean checkMessage(Text message, boolean overlay) {
}

if (rule.getShowAnnouncement()) {
ChatRuleAnnouncementScreen.setText(newMessage);
TitleContainer.addTitle(new Title(newMessage.copy()), SkyblockerConfigManager.get().chat.chatRuleConfig.announcementLength) ;
}

//show in action bar
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/skyblocker/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@
"skyblocker.config.chat.chatRules.screen.ruleScreen.actionBar": "Show In Action Bar:",
"skyblocker.config.chat.chatRules.screen.ruleScreen.actionBar.@Tooltip": "Show the message in your action bar.",
"skyblocker.config.chat.chatRules.screen.ruleScreen.announcement": "Show Announcement:",
"skyblocker.config.chat.chatRules.screen.ruleScreen.announcement.@Tooltip": "Show the message in the middle of the screen.",
"skyblocker.config.chat.chatRules.screen.ruleScreen.announcement.@Tooltip": "Show the message in the Title Container. It's position and scale can be changed in the UI & Visuals category of the mod settings.",
"skyblocker.config.chat.chatRules.screen.ruleScreen.false": "False",
"skyblocker.config.chat.chatRules.screen.ruleScreen.filter": "Filter:",
"skyblocker.config.chat.chatRules.screen.ruleScreen.filter.@Tooltip": "The string/regex to match a chat message to.",
Expand Down

0 comments on commit 9fc0b3c

Please sign in to comment.