aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hysky/skyblocker/skyblock/chat
diff options
context:
space:
mode:
authorolim <bobq4582@gmail.com>2024-02-15 22:21:45 +0000
committerolim <bobq4582@gmail.com>2024-02-15 22:21:45 +0000
commitdb8aa8cf1b8978099379187213f2b78535291066 (patch)
tree81f859b06b97e3dba563fcbba70bd63d8953d327 /src/main/java/de/hysky/skyblocker/skyblock/chat
parentd27d35e4caa652bd84a2421e2d544920ce9aa5fd (diff)
downloadSkyblocker-db8aa8cf1b8978099379187213f2b78535291066.tar.gz
Skyblocker-db8aa8cf1b8978099379187213f2b78535291066.tar.bz2
Skyblocker-db8aa8cf1b8978099379187213f2b78535291066.zip
fix locations and increace text input length
fixed the location check being backwards and increased the length of the filter and replace inputs
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/skyblock/chat')
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRule.java2
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRuleConfigScreen.java2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRule.java b/src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRule.java
index af35647f..0fe1c3f1 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRule.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRule.java
@@ -208,7 +208,7 @@ public class ChatRule {
}
}
}
- if (isLocationValid == null || !isLocationValid){//if location is not in the list at all and is a not a "!" location or and is a normal location
+ if (isLocationValid == null || isLocationValid){//if location is not in the list at all and is a not a "!" location or and is a normal location
return true;
}
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRuleConfigScreen.java b/src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRuleConfigScreen.java
index e866520f..b3cf1200 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRuleConfigScreen.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/chat/ChatRuleConfigScreen.java
@@ -89,6 +89,7 @@ public class ChatRuleConfigScreen extends Screen {
lineXOffset = client.textRenderer.getWidth(Text.translatable("text.autoconfig.skyblocker.option.messages.chatRules.screen.ruleScreen.filter")) + SPACER_X;
filterInput = new TextFieldWidget(MinecraftClient.getInstance().textRenderer, currentPos.leftInt() + lineXOffset, currentPos.rightInt(), 200, 20, Text.of(""));
filterInput.setText(chatRule.getFilter());
+ filterInput.setMaxLength(96);
currentPos = IntIntPair.of(currentPos.leftInt(),currentPos.rightInt() + SPACER_Y);
lineXOffset = 0;
@@ -168,6 +169,7 @@ public class ChatRuleConfigScreen extends Screen {
lineXOffset = client.textRenderer.getWidth(Text.translatable("text.autoconfig.skyblocker.option.messages.chatRules.screen.ruleScreen.replace")) + SPACER_X;
replaceMessageInput = new TextFieldWidget(MinecraftClient.getInstance().textRenderer, currentPos.leftInt() + lineXOffset, currentPos.rightInt(), 200, 20, Text.of(""));
replaceMessageInput.setText(chatRule.getReplaceMessage());
+ replaceMessageInput.setMaxLength(96);
finishButton = ButtonWidget.builder(Text.translatable("text.autoconfig.skyblocker.option.messages.chatRules.screen.ruleScreen.finish"), a -> {
close();