diff --git a/RuneLitePlus/src/main/java/net/runelite/client/Notifier.java b/RuneLitePlus/src/main/java/net/runelite/client/Notifier.java index 6a697d8f66..cd527b51ed 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("/runelite.png")) + try (InputStream stream = Notifier.class.getResourceAsStream("/runeliteplus.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 8eda3a582e..b64ab9f0ca 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,22 +34,11 @@ 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 = 1 + position = 0 ) default boolean enableOpacity() { @@ -64,7 +53,7 @@ public interface RuneLitePlusConfig extends Config keyName = "opacityPercentage", name = "Opacity percentage", description = "Changes the opacity of the window if opacity is enabled", - position = 2 + position = 1 ) default int opacityPercentage() { @@ -75,21 +64,10 @@ public interface RuneLitePlusConfig extends Config keyName = "keyboardPin", name = "Keyboard bank pin", description = "Enables you to type your bank pin", - position = 3 + position = 2 ) default boolean keyboardPin() { return false; } - - @ConfigItem( - keyName = "logOpt", - name = "Send logs", - description = "Send logs to help us analyze errors", - position = 4 - ) - default boolean logOpt() - { - return false; - } } 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 7bcdacb271..cc1529b846 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 @@ -159,27 +159,13 @@ 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.customPresence()) - { - RuneLiteProperties.discordAppID = rlPlusDiscordApp; - discordService.close(); - discordService.init(); - } - else - { - RuneLiteProperties.discordAppID = rlDiscordApp; - discordService.close(); - discordService.init(); - } } @Subscribe @@ -190,33 +176,7 @@ public class RuneLitePlusPlugin extends Plugin return; } - 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()) + if (!config.keyboardPin()) { entered = -1; enterIdx = 0; diff --git a/RuneLitePlus/src/main/java/net/runelite/client/plugins/test/Test.java b/RuneLitePlus/src/main/java/net/runelite/client/plugins/test/Test.java deleted file mode 100644 index c6772da865..0000000000 --- a/RuneLitePlus/src/main/java/net/runelite/client/plugins/test/Test.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2018, https://runelitepl.us - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.client.plugins.test; - -import api.Client; -import api.events.ChatMessage; -import api.events.ClientTick; -import api.events.GameTick; -import api.events.MenuOpened; -import api.events.VarbitChanged; -import com.google.common.eventbus.Subscribe; -import com.google.inject.Binder; -import javax.inject.Inject; -import javax.inject.Singleton; - -import com.google.inject.Provides; -import lombok.extern.slf4j.Slf4j; -import net.runelite.client.config.ConfigManager; -import net.runelite.client.plugins.Plugin; -import net.runelite.client.plugins.PluginDescriptor; -import net.runelite.client.ui.overlay.OverlayManager; - -/** - * Authors gazivodag longstreet - */ -@PluginDescriptor( - name = "Test", - description = "Testing plugin for building functionality", - tags = {} -) -@Singleton -@Slf4j -public class Test extends Plugin -{ - - @Provides - TestConfig getConfig(ConfigManager configManager) - { - return configManager.getConfig(TestConfig.class); - } - - @Inject - private TestOverlay testOverlay; - - @Inject - private TestConfig config; - - @Inject - private Client client; - - @Inject - private OverlayManager overlayManager; - - @Override - public void configure(Binder binder) - { - } - - @Override - protected void startUp() throws Exception - { - overlayManager.add(testOverlay); - System.out.println("Test Plugin started"); - } - - @Override - protected void shutDown() throws Exception - { - - } - - @Subscribe - public void onMenuOpened(MenuOpened event) - { - System.out.println("[Test Plugin] Menu Opened"); - } - - @Subscribe - public void onChatMessage(ChatMessage chatMessage) - { - System.out.println("[Test Plugin] Chat Message"); - } - - @Subscribe - public void onVarbitChanged(VarbitChanged event) - { - System.out.println("[Test Plugin] Varbit Changed"); - } -} \ No newline at end of file diff --git a/RuneLitePlus/src/main/java/net/runelite/client/plugins/test/TestConfig.java b/RuneLitePlus/src/main/java/net/runelite/client/plugins/test/TestConfig.java deleted file mode 100644 index f7bc35b3e7..0000000000 --- a/RuneLitePlus/src/main/java/net/runelite/client/plugins/test/TestConfig.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2018, Cas - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.client.plugins.test; - - -import net.runelite.client.config.Config; -import net.runelite.client.config.ConfigGroup; -import net.runelite.client.config.ConfigItem; - -import java.awt.*; - -@ConfigGroup("test") -public interface TestConfig extends Config -{ - @ConfigItem( - keyName = "Testing 1", - name = "Test option", - description = "Enable/disable nothing", - position = 1 - ) - default boolean tested() - { - return true; - } -} diff --git a/RuneLitePlus/src/main/java/net/runelite/client/plugins/test/TestOverlay.java b/RuneLitePlus/src/main/java/net/runelite/client/plugins/test/TestOverlay.java deleted file mode 100644 index 59edb9e8ea..0000000000 --- a/RuneLitePlus/src/main/java/net/runelite/client/plugins/test/TestOverlay.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * Copyright (c) 2018, Cas - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.client.plugins.test; - -import api.Client; -import net.runelite.client.ui.overlay.Overlay; -import net.runelite.client.ui.overlay.OverlayLayer; -import net.runelite.client.ui.overlay.OverlayPosition; - -import javax.inject.Inject; -import java.awt.*; - -class TestOverlay extends Overlay -{ - private static final Color SHORTCUT_HIGH_LEVEL_COLOR = Color.ORANGE; - - private final Client client; - private final Test plugin; - private final TestConfig config; - - @Inject - private TestOverlay(Client client, Test plugin, TestConfig config) - { - super(plugin); - setPosition(OverlayPosition.DYNAMIC); - setLayer(OverlayLayer.ABOVE_SCENE); - this.client = client; - this.plugin = plugin; - this.config = config; - } - - @Override - public Dimension render(Graphics2D graphics) - { - System.out.println("Rendered Test"); - graphics.setColor(Color.RED); - graphics.drawString("Hello World", 20, 20); - return null; - } -} 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 f64de3c0df..15d2bca548 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, "/runelite.png"); + public static final BufferedImage ICON = ImageUtil.getResourceStreamFromClass(ClientUI.class, "/runeliteplus.png"); @Getter private TrayIcon trayIcon;