From 4964647de28dbf5e81490776db8e3b4099517208 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Wed, 29 Nov 2023 10:19:25 +0100 Subject: [PATCH] Add .editorconfig --- .editorconfig | 9 +++++++ .../StealingArtefactsConfig.java | 24 +++++++++---------- .../StealingArtefactsHouseOverlay.java | 2 +- .../StealingArtefactsOverlay.java | 20 ++++++++-------- .../StealingArtefactsPatrolOverlay.java | 4 ++-- .../StealingArtefactsPlugin.java | 6 ++--- 6 files changed, 37 insertions(+), 28 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..76c58e2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*.{java,kt,kts}] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true diff --git a/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsConfig.java b/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsConfig.java index d0de854..29a508c 100644 --- a/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsConfig.java +++ b/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsConfig.java @@ -9,36 +9,36 @@ public interface StealingArtefactsConfig extends Config { String GROUP_NAME = "StealingArtefacts"; @ConfigItem( - keyName = "highlightPatrols", - name = "Highlight Patrols", - description = "Whether or not to highlight patrols" + keyName = "highlightPatrols", + name = "Highlight Patrols", + description = "Whether or not to highlight patrols" ) default boolean highlightPatrols() { return true; } @ConfigItem( - keyName = "highlightLadders", - name = "Highlight House Ladders", - description = "Whether or not to highlight house ladders" + keyName = "highlightLadders", + name = "Highlight House Ladders", + description = "Whether or not to highlight house ladders" ) default boolean highlightLadders() { return true; } @ConfigItem( - keyName = "highlightGuardLures", - name = "Highlight Lured Guards", - description = "Whether or not to highlight guards when lured/positioned correctly" + keyName = "highlightGuardLures", + name = "Highlight Lured Guards", + description = "Whether or not to highlight guards when lured/positioned correctly" ) default boolean highlightGuardLures() { return true; } @ConfigItem( - keyName = "showToNextLevel", - name = "Show artefacts to next level", - description = "Whether or not to show artefacts to next level" + keyName = "showToNextLevel", + name = "Show artefacts to next level", + description = "Whether or not to show artefacts to next level" ) default boolean showToNextLevel() { return true; diff --git a/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsHouseOverlay.java b/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsHouseOverlay.java index d84c3ca..383a54b 100644 --- a/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsHouseOverlay.java +++ b/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsHouseOverlay.java @@ -54,7 +54,7 @@ public Dimension render(Graphics2D graphics) { } if (client.getPlane() == object.getWorldLocation().getPlane()) { OverlayUtil.renderHoverableArea(graphics, object.getClickbox(), mousePosition, CLICKBOX_FILL_COLOR, - CLICKBOX_BORDER, CLICKBOX_HOVER_BORDER); + CLICKBOX_BORDER, CLICKBOX_HOVER_BORDER); } } diff --git a/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsOverlay.java b/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsOverlay.java index 0217ccf..240d393 100644 --- a/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsOverlay.java +++ b/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsOverlay.java @@ -61,19 +61,19 @@ public Dimension render(Graphics2D graphics) { String eastGuardLured = plugin.eastGuardLured ? "\u2713" : "\u2717"; panelComponent.getChildren().add(LineComponent.builder() - .left("Eastern Guard") - .right(eastGuardLured) - .rightFont(FontManager.getDefaultFont()) - .rightColor(plugin.eastGuardLured ? Color.GREEN : Color.RED) - .build()); + .left("Eastern Guard") + .right(eastGuardLured) + .rightFont(FontManager.getDefaultFont()) + .rightColor(plugin.eastGuardLured ? Color.GREEN : Color.RED) + .build()); String southEastGuardLured = plugin.southEastGuardLured ? "\u2713" : "\u2717"; panelComponent.getChildren().add(LineComponent.builder() - .left("South-East Guard") - .right(southEastGuardLured) - .rightFont(FontManager.getDefaultFont()) - .rightColor(plugin.southEastGuardLured ? Color.GREEN : Color.RED) - .build()); + .left("South-East Guard") + .right(southEastGuardLured) + .rightFont(FontManager.getDefaultFont()) + .rightColor(plugin.southEastGuardLured ? Color.GREEN : Color.RED) + .build()); } panelComponent.setPreferredSize(new Dimension(200, 0)); diff --git a/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsPatrolOverlay.java b/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsPatrolOverlay.java index d5b892d..80ebb1b 100644 --- a/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsPatrolOverlay.java +++ b/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsPatrolOverlay.java @@ -49,10 +49,10 @@ public Dimension render(Graphics2D graphics) { for (NPC actor : plugin.markedNPCs) { if ((actor.getId() == Constants.PATROL_ID_MAX) && plugin.isGuardLured(actor) && config.highlightGuardLures()) { OverlayUtil.renderHoverableArea(graphics, actor.getConvexHull(), - mousePosition, CLICKBOX_FILL_COLOR_LURED, CLICKBOX_BORDER, CLICKBOX_BORDER); + mousePosition, CLICKBOX_FILL_COLOR_LURED, CLICKBOX_BORDER, CLICKBOX_BORDER); } else { OverlayUtil.renderHoverableArea(graphics, actor.getConvexHull(), - mousePosition, CLICKBOX_FILL_COLOR, CLICKBOX_BORDER, CLICKBOX_BORDER); + mousePosition, CLICKBOX_FILL_COLOR, CLICKBOX_BORDER, CLICKBOX_BORDER); } } diff --git a/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsPlugin.java b/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsPlugin.java index 163f8f9..51f28ea 100644 --- a/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsPlugin.java +++ b/src/main/java/io/cbitler/stealingartefacts/StealingArtefactsPlugin.java @@ -21,9 +21,9 @@ import java.util.concurrent.atomic.AtomicReference; @PluginDescriptor( - name = "Stealing Artefacts", - description = "Show the current house for stealing artefacts", - tags = {} + name = "Stealing Artefacts", + description = "Show the current house for stealing artefacts", + tags = {} ) @PluginDependency(XpTrackerPlugin.class) @Slf4j