diff options
author | syeyoung <cyoung06@naver.com> | 2023-02-05 22:12:46 +0900 |
---|---|---|
committer | syeyoung <cyoung06@naver.com> | 2023-02-05 22:12:46 +0900 |
commit | ea49bbcbdfe5c75fbd9b0fcdc36f701efad2250a (patch) | |
tree | 5e6b140db144f98f3800dd7a63f4a99dbfdeac40 /mod/src/main/java | |
parent | be67be774fc50434ede11d1c29209d700c0f41e0 (diff) | |
download | Skyblock-Dungeons-Guide-ea49bbcbdfe5c75fbd9b0fcdc36f701efad2250a.tar.gz Skyblock-Dungeons-Guide-ea49bbcbdfe5c75fbd9b0fcdc36f701efad2250a.tar.bz2 Skyblock-Dungeons-Guide-ea49bbcbdfe5c75fbd9b0fcdc36f701efad2250a.zip |
- Fix ability cooldown not working
- Fix loading data from inv: Fixes #187
Signed-off-by: syeyoung <cyoung06@naver.com>
Diffstat (limited to 'mod/src/main/java')
2 files changed, 9 insertions, 3 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/ability/FeatureAbilityCooldown.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/ability/FeatureAbilityCooldown.java index 32ba7920..22d8ed72 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/ability/FeatureAbilityCooldown.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/ability/FeatureAbilityCooldown.java @@ -373,8 +373,14 @@ public class FeatureAbilityCooldown extends TextHUDFeature { thecd = Integer.parseInt(thecdstr); currentAbility.setCooldown(thecd); currentAbility = null; - } else if (specific.startsWith("§6Item Ability: ")) { - String ability = TextUtils.stripColor(specific).substring(14).trim(); + } else if (specific.startsWith("§6Ability: ") || specific.startsWith("§6Item Ability: ")) { + String ability; + if (specific.startsWith("§6I")) + ability = specific.substring(18); + else + ability = specific.substring(11); + if (ability.endsWith(" §e§lRIGHT CLICK")) ability = ability.replace(" §e§lRIGHT CLICK", ""); + ability = TextUtils.stripColor(ability).trim(); for (SkyblockAbility skyblockAbility1 : skyblockAbility) { if (skyblockAbility1.getName().equals(ability)) { diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/text/TextHUDFeature.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/text/TextHUDFeature.java index 4235d79f..90ef0ffe 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/text/TextHUDFeature.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/text/TextHUDFeature.java @@ -70,7 +70,7 @@ public abstract class TextHUDFeature extends AbstractHUDFeature implements Style private Map<String, ParentDelegatingTextStyle> builtTextStyles = new HashMap<>(); @DGEventHandler - public void onTick(DGTickEvent dgTickEvent) { + public void onTick0(DGTickEvent dgTickEvent) { try { checkVisibility(); if (isHUDViewable()) { |