aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/cowtipper/cowlection
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/cowtipper/cowlection')
-rw-r--r--src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java2
-rw-r--r--src/main/java/de/cowtipper/cowlection/util/Utils.java12
2 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java
index 57afdb1..b70dc25 100644
--- a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java
+++ b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java
@@ -123,7 +123,7 @@ public class DungeonsListener {
if (e.itemStack == null || e.toolTip == null) {
return;
}
- boolean toggleKeyBindingPressed = MooConfig.isDungeonItemTooltipToggleKeyBindingPressed();
+ boolean toggleKeyBindingPressed = MooConfig.isDungeonItemTooltipToggleKeyBindingPressed() && !main.getDungeonCache().isInDungeon();
MooConfig.Setting showItemQualityAndFloorDisplay = MooConfig.getShowItemQualityAndFloorDisplay();
boolean showItemQualityAndFloor = showItemQualityAndFloorDisplay == MooConfig.Setting.ALWAYS
|| (showItemQualityAndFloorDisplay == MooConfig.Setting.SPECIAL && toggleKeyBindingPressed);
diff --git a/src/main/java/de/cowtipper/cowlection/util/Utils.java b/src/main/java/de/cowtipper/cowlection/util/Utils.java
index 9a07ab8..0d2290d 100644
--- a/src/main/java/de/cowtipper/cowlection/util/Utils.java
+++ b/src/main/java/de/cowtipper/cowlection/util/Utils.java
@@ -376,11 +376,13 @@ public final class Utils {
reforgeLength = reforgePrefix.length() - 1;
}
- if (strikethrough) {
- modifiedItemName.insert(reforgeInItemName, grayedOutFormatting)
- .insert(reforgeInItemName + reforgeLength + grayedOutFormatting.length(), originalItemName.substring(0, reforgeInItemName));
- } else {
- modifiedItemName.delete(reforgeInItemName, reforgeInItemName + reforgeLength);
+ if(reforgeInItemName >= 0) {
+ if (strikethrough) {
+ modifiedItemName.insert(reforgeInItemName, grayedOutFormatting)
+ .insert(reforgeInItemName + reforgeLength + grayedOutFormatting.length(), originalItemName.substring(0, reforgeInItemName));
+ } else {
+ modifiedItemName.delete(reforgeInItemName, reforgeInItemName + reforgeLength);
+ }
}
}
}