From 5eb12b71198105fee70ae541fb2720d7bb298fc4 Mon Sep 17 00:00:00 2001 From: zeruth Date: Thu, 6 Jun 2019 23:35:26 -0400 Subject: [PATCH] fixed maven issues Maven really fucked me on this merge lol --- RuneLitePlus/pom.xml | 8 +-- .../java/net/runelite/client/Notifier.java | 2 +- .../runeliteplus/RuneLitePlusConfig.java | 19 +++++-- .../runeliteplus/RuneLitePlusPlugin.java | 53 ++++++++++++++++--- .../net/runelite/client/rs/ClientLoader.java | 2 +- .../java/net/runelite/client/ui/ClientUI.java | 2 +- deobfuscator/pom.xml | 11 ++++ injected-client/pom.xml | 14 ++--- injector-plugin/pom.xml | 2 +- 9 files changed, 87 insertions(+), 26 deletions(-) diff --git a/RuneLitePlus/pom.xml b/RuneLitePlus/pom.xml index e972136a57..882c45db1f 100644 --- a/RuneLitePlus/pom.xml +++ b/RuneLitePlus/pom.xml @@ -27,9 +27,9 @@ 4.0.0 - com.runeswag - runeswag-parent - 1.0-SNAPSHOT + net.runelite + runelite-parent + 1.5.26-SNAPSHOT client @@ -422,7 +422,7 @@ net.runelite script-assembler-plugin - 1.5.26-SNAPSHOT + 1.5.23-SNAPSHOT assemble diff --git a/RuneLitePlus/src/main/java/net/runelite/client/Notifier.java b/RuneLitePlus/src/main/java/net/runelite/client/Notifier.java index cd527b51ed..6a697d8f66 100644 --- a/RuneLitePlus/src/main/java/net/runelite/client/Notifier.java +++ b/RuneLitePlus/src/main/java/net/runelite/client/Notifier.java @@ -300,7 +300,7 @@ public class Notifier { if (OSType.getOSType() == OSType.Linux && !Files.exists(notifyIconPath)) { - try (InputStream stream = Notifier.class.getResourceAsStream("/runeliteplus.png")) + try (InputStream stream = Notifier.class.getResourceAsStream("/runelite.png")) { Files.copy(stream, notifyIconPath); } diff --git a/RuneLitePlus/src/main/java/net/runelite/client/plugins/runeliteplus/RuneLitePlusConfig.java b/RuneLitePlus/src/main/java/net/runelite/client/plugins/runeliteplus/RuneLitePlusConfig.java index f88417ccad..8eda3a582e 100644 --- a/RuneLitePlus/src/main/java/net/runelite/client/plugins/runeliteplus/RuneLitePlusConfig.java +++ b/RuneLitePlus/src/main/java/net/runelite/client/plugins/runeliteplus/RuneLitePlusConfig.java @@ -34,11 +34,22 @@ import net.runelite.client.config.Range; @ConfigGroup("runeliteplus") public interface RuneLitePlusConfig extends Config { + @ConfigItem( + position = 0, + keyName = "customPresence", + name = "RL+ Presence", + description = "Represent RL+ with a custom icon and discord presence." + ) + default boolean customPresence() + { + return false; + } + @ConfigItem( keyName = "enableOpacity", name = "Enable opacity", description = "Enables opacity for the whole window.
NOTE: This only stays enabled if your pc supports this!", - position = 0 + position = 1 ) default boolean enableOpacity() { @@ -53,7 +64,7 @@ public interface RuneLitePlusConfig extends Config keyName = "opacityPercentage", name = "Opacity percentage", description = "Changes the opacity of the window if opacity is enabled", - position = 1 + position = 2 ) default int opacityPercentage() { @@ -64,7 +75,7 @@ public interface RuneLitePlusConfig extends Config keyName = "keyboardPin", name = "Keyboard bank pin", description = "Enables you to type your bank pin", - position = 2 + position = 3 ) default boolean keyboardPin() { @@ -75,7 +86,7 @@ public interface RuneLitePlusConfig extends Config keyName = "logOpt", name = "Send logs", description = "Send logs to help us analyze errors", - position = 3 + position = 4 ) default boolean logOpt() { diff --git a/RuneLitePlus/src/main/java/net/runelite/client/plugins/runeliteplus/RuneLitePlusPlugin.java b/RuneLitePlus/src/main/java/net/runelite/client/plugins/runeliteplus/RuneLitePlusPlugin.java index a0bfee6350..3d372aa796 100644 --- a/RuneLitePlus/src/main/java/net/runelite/client/plugins/runeliteplus/RuneLitePlusPlugin.java +++ b/RuneLitePlus/src/main/java/net/runelite/client/plugins/runeliteplus/RuneLitePlusPlugin.java @@ -160,19 +160,32 @@ public class RuneLitePlusPlugin extends Plugin @Override protected void startUp() throws Exception { - ClientUI.currentPresenceName = ("RuneLitePlus"); - ClientUI.frame.setTitle(ClientUI.currentPresenceName); - RuneLiteProperties.discordAppID = rlPlusDiscordApp; - discordService.close(); - discordService.init(); - entered = -1; enterIdx = 0; + if (getConfig(configManager).customPresence()) + { + ClientUI.currentPresenceName = ("RuneLitePlus"); + ClientUI.frame.setTitle(ClientUI.currentPresenceName); + } + if (config.logOpt()) { Sentry.init("https://f0ed76be2fe847f8b9eb3620fa55d729@sentry.io/1468399?stacktrace.app.packages=net.runelite.client"); } + + if (config.customPresence()) + { + RuneLiteProperties.discordAppID = rlPlusDiscordApp; + discordService.close(); + discordService.init(); + } + else + { + RuneLiteProperties.discordAppID = rlDiscordApp; + discordService.close(); + discordService.init(); + } } @Subscribe @@ -183,7 +196,33 @@ public class RuneLitePlusPlugin extends Plugin return; } - if (!config.keyboardPin()) + if (event.getKey().equals("customPresence")) + { + if (config.customPresence()) + { + ClientUI.currentPresenceName = ("RuneLitePlus"); + ClientUI.frame.setTitle(ClientUI.currentPresenceName); + } + else + { + ClientUI.currentPresenceName = ("RuneLite"); + ClientUI.frame.setTitle(ClientUI.currentPresenceName); + } + + if (config.customPresence()) + { + RuneLiteProperties.discordAppID = rlPlusDiscordApp; + discordService.close(); + discordService.init(); + } + else + { + RuneLiteProperties.discordAppID = rlDiscordApp; + discordService.close(); + discordService.init(); + } + } + else if (!config.keyboardPin()) { entered = -1; enterIdx = 0; diff --git a/RuneLitePlus/src/main/java/net/runelite/client/rs/ClientLoader.java b/RuneLitePlus/src/main/java/net/runelite/client/rs/ClientLoader.java index 694f5de7e3..f6dbe5b331 100644 --- a/RuneLitePlus/src/main/java/net/runelite/client/rs/ClientLoader.java +++ b/RuneLitePlus/src/main/java/net/runelite/client/rs/ClientLoader.java @@ -64,7 +64,7 @@ import org.apache.commons.compress.compressors.CompressorException; @Singleton public class ClientLoader { - private static final File CUSTOMFILE = new File("./injected-client/target/injected-client-1.5.25-SNAPSHOT.jar"); + private static final File CUSTOMFILE = new File("./injected-client/target/injected-client-1.0-SNAPSHOT.jar"); private final ClientConfigLoader clientConfigLoader; private ClientUpdateCheckMode updateCheckMode; diff --git a/RuneLitePlus/src/main/java/net/runelite/client/ui/ClientUI.java b/RuneLitePlus/src/main/java/net/runelite/client/ui/ClientUI.java index 15d2bca548..f64de3c0df 100644 --- a/RuneLitePlus/src/main/java/net/runelite/client/ui/ClientUI.java +++ b/RuneLitePlus/src/main/java/net/runelite/client/ui/ClientUI.java @@ -117,7 +117,7 @@ public class ClientUI private static final int CLIENT_WELL_HIDDEN_MARGIN_TOP = 10; public static boolean allowInput = false; public static String currentPresenceName = "RuneLite"; - public static final BufferedImage ICON = ImageUtil.getResourceStreamFromClass(ClientUI.class, "/runeliteplus.png"); + public static final BufferedImage ICON = ImageUtil.getResourceStreamFromClass(ClientUI.class, "/runelite.png"); @Getter private TrayIcon trayIcon; diff --git a/deobfuscator/pom.xml b/deobfuscator/pom.xml index c8e216407f..4d650539e7 100644 --- a/deobfuscator/pom.xml +++ b/deobfuscator/pom.xml @@ -153,6 +153,17 @@
+ + org.apache.maven.plugins + maven-jar-plugin + + + + test-jar + + + + diff --git a/injected-client/pom.xml b/injected-client/pom.xml index f0a49fedc2..98f48b022e 100644 --- a/injected-client/pom.xml +++ b/injected-client/pom.xml @@ -27,9 +27,9 @@ 4.0.0 - net.runelite - runelite-parent - 1.5.25-SNAPSHOT + com.runeswag + runeswag-parent + 1.0-SNAPSHOT injected-client @@ -37,9 +37,9 @@ - com.runeswag + net.runelite client - 1.0-SNAPSHOT + 1.5.26-SNAPSHOT true @@ -51,7 +51,7 @@ net.runelite.rs vanilla - ${rs.version} + 180 true @@ -61,7 +61,7 @@ net.runelite.rs injector-plugin - ${project.version} + 1.5.26-SNAPSHOT diff --git a/injector-plugin/pom.xml b/injector-plugin/pom.xml index 55ec87dd93..e2162d2eca 100644 --- a/injector-plugin/pom.xml +++ b/injector-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.5.25-SNAPSHOT + 1.5.26-SNAPSHOT net.runelite.rs