diff options
Diffstat (limited to 'src/main/java/me/Danker/features/HidePetCandy.java')
-rw-r--r-- | src/main/java/me/Danker/features/HidePetCandy.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/main/java/me/Danker/features/HidePetCandy.java b/src/main/java/me/Danker/features/HidePetCandy.java new file mode 100644 index 0000000..8ef28d2 --- /dev/null +++ b/src/main/java/me/Danker/features/HidePetCandy.java @@ -0,0 +1,26 @@ +package me.Danker.features; + +import me.Danker.commands.ToggleCommand; +import me.Danker.utils.Utils; +import net.minecraftforge.event.entity.player.ItemTooltipEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +public class HidePetCandy { + + @SubscribeEvent + public void onTooltip(ItemTooltipEvent event) { + if (!Utils.inSkyblock) return; + if (event.toolTip == null) return; + + if (ToggleCommand.hidePetCandy) { + for (int i = 0; i < event.toolTip.size(); i++) { + if (event.toolTip.get(i).endsWith("Pet Candy Used")) { + event.toolTip.remove(i); + event.toolTip.remove(i); + break; + } + } + } + } + +} |