diff options
Diffstat (limited to 'src/main/java/me/Danker/features')
-rw-r--r-- | src/main/java/me/Danker/features/HighlightCommissions.java | 39 | ||||
-rw-r--r-- | src/main/java/me/Danker/features/SpamHider.java | 2 |
2 files changed, 40 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/features/HighlightCommissions.java b/src/main/java/me/Danker/features/HighlightCommissions.java new file mode 100644 index 0000000..f59951a --- /dev/null +++ b/src/main/java/me/Danker/features/HighlightCommissions.java @@ -0,0 +1,39 @@ +package me.Danker.features; + +import me.Danker.commands.ToggleCommand; +import me.Danker.events.GuiChestBackgroundDrawnEvent; +import me.Danker.handlers.ConfigHandler; +import me.Danker.utils.Utils; +import net.minecraft.inventory.Slot; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraft.item.ItemWritableBook; + +import org.lwjgl.util.Color; +import java.util.List; + +public class HighlightCommissions { + + public static int HIGHLIGHT_COLOUR; + + @SubscribeEvent + public void onGuiRender(GuiChestBackgroundDrawnEvent event) { + if(!Utils.inSkyblock) return; + if(!ToggleCommand.highlightCommissions) return; + List<Slot> slots = event.slots; + if (!event.displayName.equals("Commissions")) return; + + for (Slot slot : slots) { + if (slot != null && slot.getStack() == null) continue; + if (slot.getStack().getItem() instanceof ItemWritableBook) { + for (String line : Utils.getItemLore(slot.getStack())) { + if (line.contains("COMPLETED")) { + Utils.drawOnSlot(event.chestSize, slot.xDisplayPosition, slot.yDisplayPosition, HIGHLIGHT_COLOUR + 0xD7000000); + break; + } + } + + } + } + } + +} diff --git a/src/main/java/me/Danker/features/SpamHider.java b/src/main/java/me/Danker/features/SpamHider.java index a88d9e5..f1a40c9 100644 --- a/src/main/java/me/Danker/features/SpamHider.java +++ b/src/main/java/me/Danker/features/SpamHider.java @@ -49,7 +49,7 @@ public class SpamHider { } // Kill Combo if (!ToggleCommand.killComboMessages) { - if ((message.contains("+") && message.contains(" Kill Combo ")) || message.contains("Your Kill Combo has expired!")) { + if ((message.contains("+") && message.contains(" Kill Combo")) || message.contains("Your Kill Combo has expired!")) { event.setCanceled(true); } } |