diff --git a/CHANGELOG.md b/CHANGELOG.md index cab46f7..5a72fce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## Unreleased +- Minor: Add a config for toggling the overlay. (#22) + ## 1.3 - Minor: Add a plugin hub icon of Captain Khaled, the face of artefact stealing. (#1) diff --git a/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsConfig.java b/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsConfig.java index 24b4ad6..cdbaf21 100644 --- a/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsConfig.java +++ b/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsConfig.java @@ -53,4 +53,14 @@ default int currentHouse() { name = "Show artefacts to next level", description = "Whether or not to show artefacts to next level" ) - default boolean showToNextLevel() { return true; }} + default boolean showToNextLevel() { return true; } + + @ConfigItem( + keyName = "showOverlay", + name = "Show overlay", + description = "Uncheck this to hide the overlay" + ) + default boolean showOverlay() { + return true; + } +} \ No newline at end of file diff --git a/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsOverlay.java b/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsOverlay.java index 1b0608d..f096a43 100644 --- a/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsOverlay.java +++ b/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsOverlay.java @@ -36,6 +36,10 @@ private StealingArtefactsOverlay(Client client, StealingArtefactsPlugin plugin, */ @Override public Dimension render(Graphics2D graphics) { + if (!config.showOverlay()) { + return null; + } + if (client.getLocalPlayer() != null && plugin.isInPisc(client.getLocalPlayer().getWorldLocation())) { panelComponent.getChildren().clear(); String title = "Stealing Artefacts";