diff --git a/client/src/main/java/plugin/PluginRepository.java b/client/src/main/java/plugin/PluginRepository.java index 68d5102..2af27f6 100644 --- a/client/src/main/java/plugin/PluginRepository.java +++ b/client/src/main/java/plugin/PluginRepository.java @@ -103,11 +103,16 @@ public class PluginRepository { Class clazz = loader.loadClass(file.getName() + ".plugin"); - PluginInfo info; - if (infoFile.exists()) - info = PluginInfo.loadFromFile(infoFile); - else - info = PluginInfo.loadFromClass(clazz); + PluginInfo info = null; + try { + if (infoFile.exists()) + info = PluginInfo.loadFromFile(infoFile); + else + info = PluginInfo.loadFromClass(clazz); + } catch (Exception e) { + System.err.println("Unable to load plugin " + file.getName() + " because there were issues parsing its info: "); + e.printStackTrace(); + } if (info == null) { System.err.println("Unable to load plugin " + file.getName() + " because it contains no information about author, version, etc!"); diff --git a/plugin-playground/build.gradle b/plugin-playground/build.gradle index ad7d59d..52d48d4 100644 --- a/plugin-playground/build.gradle +++ b/plugin-playground/build.gradle @@ -98,8 +98,16 @@ class plugin : Plugin() { task buildPlugins(type: Copy, dependsOn: classes) { def pluginsPath = rootProject.project("client").projectDir.absolutePath + File.separator + "plugins" - from "build/classes/java/main" - into pluginsPath - from "build/classes/kotlin/main" - into pluginsPath + copy { + from(layout.projectDirectory.dir("src/main/java")) + from (layout.projectDirectory.dir("src/main/kotlin")) + include("**/*.properties") + into pluginsPath + } + + copy { + from "build/classes/java/main" + from "build/classes/kotlin/main" + into pluginsPath + } } \ No newline at end of file diff --git a/plugin-playground/src/main/java/InterfaceDebugPlugin/plugin.java b/plugin-playground/src/main/java/InterfaceDebugPlugin/plugin.java index 1edf1df..dc767b0 100644 --- a/plugin-playground/src/main/java/InterfaceDebugPlugin/plugin.java +++ b/plugin-playground/src/main/java/InterfaceDebugPlugin/plugin.java @@ -9,11 +9,6 @@ import rt4.GameShell; import java.util.ArrayList; import java.util.Arrays; -@PluginMeta( - author = "Ceikry", - description = "Aids in identifying interface components/varps/model IDs.", - version = 1.2 -) public class plugin extends Plugin { private boolean isEnabled; private boolean isVerbose; diff --git a/plugin-playground/src/main/java/InterfaceDebugPlugin/plugin.properties b/plugin-playground/src/main/java/InterfaceDebugPlugin/plugin.properties new file mode 100644 index 0000000..365c76b --- /dev/null +++ b/plugin-playground/src/main/java/InterfaceDebugPlugin/plugin.properties @@ -0,0 +1,3 @@ +AUTHOR='Ceikry' +DESCRIPTION='Aids in identifying interface components/varps/model IDs.' +VERSION=1.2 \ No newline at end of file diff --git a/plugin-playground/src/main/java/OverheadDebugPlugin/plugin.java b/plugin-playground/src/main/java/OverheadDebugPlugin/plugin.java index ea77cd6..131370c 100644 --- a/plugin-playground/src/main/java/OverheadDebugPlugin/plugin.java +++ b/plugin-playground/src/main/java/OverheadDebugPlugin/plugin.java @@ -5,11 +5,6 @@ import plugin.annotations.PluginMeta; import plugin.api.*; import rt4.*; -@PluginMeta( - author = "Ceikry", - description = "Draws helpful overhead debug information.", - version = 1.3 -) public class plugin extends Plugin { private boolean isEnabled = false; diff --git a/plugin-playground/src/main/java/OverheadDebugPlugin/plugin.properties b/plugin-playground/src/main/java/OverheadDebugPlugin/plugin.properties new file mode 100644 index 0000000..e8b0c4f --- /dev/null +++ b/plugin-playground/src/main/java/OverheadDebugPlugin/plugin.properties @@ -0,0 +1,3 @@ +AUTHOR='Ceikry' +DESCRIPTION='Draws helpful overhead debug information.' +VERSION=1.3 \ No newline at end of file diff --git a/plugin-playground/src/main/java/VarpLogPlugin/plugin.java b/plugin-playground/src/main/java/VarpLogPlugin/plugin.java index 3c2a5b7..4db3378 100644 --- a/plugin-playground/src/main/java/VarpLogPlugin/plugin.java +++ b/plugin-playground/src/main/java/VarpLogPlugin/plugin.java @@ -8,11 +8,6 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; -@PluginMeta( - author = "Ceikry", - description = "Adds a simple log of varp changes drawn directly to the screen.", - version = 1.0 -) public class plugin extends Plugin { boolean isEnabled = false; diff --git a/plugin-playground/src/main/java/VarpLogPlugin/plugin.properties b/plugin-playground/src/main/java/VarpLogPlugin/plugin.properties new file mode 100644 index 0000000..29a8e09 --- /dev/null +++ b/plugin-playground/src/main/java/VarpLogPlugin/plugin.properties @@ -0,0 +1,3 @@ +AUTHOR='Ceikry' +DESCRIPTION='Adds a simple log of varp changes drawn directly to the screen.' +VERSION=1.0 \ No newline at end of file diff --git a/plugin-playground/src/main/kotlin/AudioQOL/plugin.kt b/plugin-playground/src/main/kotlin/AudioQOL/plugin.kt index 3423dac..707119f 100644 --- a/plugin-playground/src/main/kotlin/AudioQOL/plugin.kt +++ b/plugin-playground/src/main/kotlin/AudioQOL/plugin.kt @@ -10,11 +10,6 @@ import rt4.Keyboard import java.awt.event.KeyAdapter import java.awt.event.KeyEvent -@PluginMeta( - author = "Ceikry", - description = "Provides some QOL for audio, including better settings persistence", - version = 1.0 -) class plugin : Plugin() { var isMute = false var lastVolumes: Triple? = null diff --git a/plugin-playground/src/main/kotlin/AudioQOL/plugin.properties b/plugin-playground/src/main/kotlin/AudioQOL/plugin.properties new file mode 100644 index 0000000..fd79b30 --- /dev/null +++ b/plugin-playground/src/main/kotlin/AudioQOL/plugin.properties @@ -0,0 +1,3 @@ +AUTHOR='Ceikry' +DESCRIPTION='Provides some QOL for audio, including better settings persistence' +VERSION=1.0 \ No newline at end of file diff --git a/plugin-playground/src/main/kotlin/BasicInputQOL/plugin.kt b/plugin-playground/src/main/kotlin/BasicInputQOL/plugin.kt index 8be8955..4fb34a9 100644 --- a/plugin-playground/src/main/kotlin/BasicInputQOL/plugin.kt +++ b/plugin-playground/src/main/kotlin/BasicInputQOL/plugin.kt @@ -7,11 +7,6 @@ import rt4.Keyboard import java.awt.event.* import javax.swing.SwingUtilities -@PluginMeta( - author = "Ceikry", - description = "Provides some basic input QOL like scroll zoom, middle click panning, etc.", - version = 1.0 -) class plugin : Plugin() { private var cameraDebugEnabled = false private var mouseDebugEnabled = false diff --git a/plugin-playground/src/main/kotlin/BasicInputQOL/plugin.properties b/plugin-playground/src/main/kotlin/BasicInputQOL/plugin.properties new file mode 100644 index 0000000..e76c2bd --- /dev/null +++ b/plugin-playground/src/main/kotlin/BasicInputQOL/plugin.properties @@ -0,0 +1,3 @@ +AUTHOR='Ceikry' +DESCRIPTION='Provides some basic input QOL like scroll zoom, middle click panning, etc.' +VERSION=1.0 \ No newline at end of file diff --git a/plugin-playground/src/main/kotlin/BetterShiftDrop/plugin.kt b/plugin-playground/src/main/kotlin/BetterShiftDrop/plugin.kt index a31cf18..155338b 100644 --- a/plugin-playground/src/main/kotlin/BetterShiftDrop/plugin.kt +++ b/plugin-playground/src/main/kotlin/BetterShiftDrop/plugin.kt @@ -7,11 +7,6 @@ import plugin.api.MiniMenuEntry import rt4.Cheat import rt4.Keyboard -@PluginMeta( - author = "bushtail", - description = "Better dropping and destroying while holding shift. Use ::bsd command to toggle. If for some reason after installing the plugin, Better Shift Drop does not activate, run the command to activate it.", - version = 2.0 -) class plugin : Plugin() { override fun Init() { if(API.GetData("bsd-toggle") == null) { diff --git a/plugin-playground/src/main/kotlin/BetterShiftDrop/plugin.properties b/plugin-playground/src/main/kotlin/BetterShiftDrop/plugin.properties new file mode 100644 index 0000000..cd67695 --- /dev/null +++ b/plugin-playground/src/main/kotlin/BetterShiftDrop/plugin.properties @@ -0,0 +1,3 @@ +AUTHOR='bushtail' +DESCRIPTION='Better dropping and destroying while holding shift. Use ::bsd command to toggle. If for some reason after installing the plugin, Better Shift Drop does not activate, run the command to activate it.' +VERSION=2.0 \ No newline at end of file diff --git a/plugin-playground/src/main/kotlin/Craftify/plugin.kt b/plugin-playground/src/main/kotlin/Craftify/plugin.kt index 83ea948..0de39d1 100644 --- a/plugin-playground/src/main/kotlin/Craftify/plugin.kt +++ b/plugin-playground/src/main/kotlin/Craftify/plugin.kt @@ -10,11 +10,6 @@ import rt4.Fonts import rt4.Player import java.awt.Color -@PluginMeta( - author = "bushtail", - description = "Add nameplates above players heads.", - version = 1.0 -) class plugin : Plugin() { override fun PlayerOverheadDraw(player: Player?, screenX: Int, screenY: Int) { if (player == null) return diff --git a/plugin-playground/src/main/kotlin/Craftify/plugin.properties b/plugin-playground/src/main/kotlin/Craftify/plugin.properties new file mode 100644 index 0000000..bf44a94 --- /dev/null +++ b/plugin-playground/src/main/kotlin/Craftify/plugin.properties @@ -0,0 +1,3 @@ +AUTHOR='bushtail' +DESCRIPTION='Add nameplates above players heads.' +VERSION=1.0 \ No newline at end of file diff --git a/plugin-playground/src/main/kotlin/EscClose/plugin.kt b/plugin-playground/src/main/kotlin/EscClose/plugin.kt index 12489cc..88ab8f3 100644 --- a/plugin-playground/src/main/kotlin/EscClose/plugin.kt +++ b/plugin-playground/src/main/kotlin/EscClose/plugin.kt @@ -6,11 +6,6 @@ import plugin.api.API import java.awt.event.KeyAdapter import java.awt.event.KeyEvent -@PluginMeta ( - author = "Chisato", - description = "Allows you to use ESC in order to (safety) close the open interface/dialogue.", - version = 1.0 -) class plugin : Plugin() { override fun Init() { API.AddKeyboardListener(object : KeyAdapter() { diff --git a/plugin-playground/src/main/kotlin/EscClose/plugin.properties b/plugin-playground/src/main/kotlin/EscClose/plugin.properties new file mode 100644 index 0000000..e38752c --- /dev/null +++ b/plugin-playground/src/main/kotlin/EscClose/plugin.properties @@ -0,0 +1,3 @@ +AUTHOR='Chisato' +DESCRIPTION='Allows you to use ESC in order to (safety) close the open interface/dialogue.' +VERSION=1.0 \ No newline at end of file diff --git a/plugin-playground/src/main/kotlin/GroundItems/plugin.properties b/plugin-playground/src/main/kotlin/GroundItems/plugin.properties new file mode 100644 index 0000000..2a8410e --- /dev/null +++ b/plugin-playground/src/main/kotlin/GroundItems/plugin.properties @@ -0,0 +1,3 @@ +AUTHOR='downthecrop' +DESCRIPTION='Ground Items Overlay. Just like Runelite!\ncmds ::set(low,med,high,insane,hide), ::(tag,ignore)item ID, ::(reset)groundconfig\nSpecial thanks to Chisato for the original skeleton.' +VERSION=1.0 \ No newline at end of file diff --git a/plugin-playground/src/main/kotlin/IdentifyClueScrolls/plugin.kt b/plugin-playground/src/main/kotlin/IdentifyClueScrolls/plugin.kt index 1b1fc67..65991fe 100644 --- a/plugin-playground/src/main/kotlin/IdentifyClueScrolls/plugin.kt +++ b/plugin-playground/src/main/kotlin/IdentifyClueScrolls/plugin.kt @@ -6,12 +6,6 @@ import plugin.api.MiniMenuEntry import plugin.api.MiniMenuType import rt4.ObjTypeList -@PluginMeta( - author = "bushtail", - description = "Identify clue scrolls easily", - version = 1.0 -) - class plugin : Plugin() { override fun DrawMiniMenu(entry: MiniMenuEntry?) { when(entry?.type) { diff --git a/plugin-playground/src/main/kotlin/IdentifyClueScrolls/plugin.properties b/plugin-playground/src/main/kotlin/IdentifyClueScrolls/plugin.properties new file mode 100644 index 0000000..78957dc --- /dev/null +++ b/plugin-playground/src/main/kotlin/IdentifyClueScrolls/plugin.properties @@ -0,0 +1,3 @@ +AUTHOR='bushtail' +DESCRIPTION='Identify clue scrolls easily' +VERSION=1.0 \ No newline at end of file diff --git a/plugin-playground/src/main/kotlin/LoginTimer/plugin.kt b/plugin-playground/src/main/kotlin/LoginTimer/plugin.kt index 054dc2e..0ba67f7 100644 --- a/plugin-playground/src/main/kotlin/LoginTimer/plugin.kt +++ b/plugin-playground/src/main/kotlin/LoginTimer/plugin.kt @@ -14,11 +14,6 @@ import java.util.concurrent.TimeUnit * Timer/SysTime that goes over the report abuse button * @author Woah */ -@PluginMeta( - author = "Woahscam, Ceikry", - description = "Displays the session time played, system time, or no time over the \"Report Abuse\" button.", - version = 1.2 -) class plugin : Plugin() { private val COMPONENT_REPORT_ABUSE = 49217565 diff --git a/plugin-playground/src/main/kotlin/LoginTimer/plugin.properties b/plugin-playground/src/main/kotlin/LoginTimer/plugin.properties new file mode 100644 index 0000000..c4258ec --- /dev/null +++ b/plugin-playground/src/main/kotlin/LoginTimer/plugin.properties @@ -0,0 +1,3 @@ +AUTHOR='Woahscam, Ceikry' +DESCRIPTION='Displays the session time played, system time, or no time over the \"Report Abuse\" button.' +VERSION=1.2 \ No newline at end of file diff --git a/plugin-playground/src/main/kotlin/MiniMenuQOL/plugin.kt b/plugin-playground/src/main/kotlin/MiniMenuQOL/plugin.kt index d19124b..19d1f23 100644 --- a/plugin-playground/src/main/kotlin/MiniMenuQOL/plugin.kt +++ b/plugin-playground/src/main/kotlin/MiniMenuQOL/plugin.kt @@ -8,11 +8,6 @@ import rt4.NpcType import rt4.ObjType import rt4.ObjTypeList -@PluginMeta( - author = "Ceikry", - description = "Provides debug and some basic QOL for the MiniMenu", - version = 1.0 -) class plugin : Plugin() { private var debugEnabled = false diff --git a/plugin-playground/src/main/kotlin/MiniMenuQOL/plugin.properties b/plugin-playground/src/main/kotlin/MiniMenuQOL/plugin.properties new file mode 100644 index 0000000..91bfb7c --- /dev/null +++ b/plugin-playground/src/main/kotlin/MiniMenuQOL/plugin.properties @@ -0,0 +1,3 @@ +AUTHOR='Ceikry' +DESCRIPTION='Provides debug and some basic QOL for the MiniMenu' +VERSION=1.0 \ No newline at end of file diff --git a/plugin-playground/src/main/kotlin/RememberMyLogin/plugin.kt b/plugin-playground/src/main/kotlin/RememberMyLogin/plugin.kt index 05cb30c..5c5d39f 100644 --- a/plugin-playground/src/main/kotlin/RememberMyLogin/plugin.kt +++ b/plugin-playground/src/main/kotlin/RememberMyLogin/plugin.kt @@ -8,11 +8,6 @@ import rt4.JagString import rt4.Player import rt4.client -@PluginMeta ( - author = "Ceikry", - description = "Stores your last used login for automatic reuse, per server", - version = 1.1 -) class plugin : Plugin() { var hasRan = false var credentials = HashMap>() diff --git a/plugin-playground/src/main/kotlin/RememberMyLogin/plugin.properties b/plugin-playground/src/main/kotlin/RememberMyLogin/plugin.properties new file mode 100644 index 0000000..c010f1b --- /dev/null +++ b/plugin-playground/src/main/kotlin/RememberMyLogin/plugin.properties @@ -0,0 +1,3 @@ +AUTHOR='Ceikry' +DESCRIPTION='Stores your last used login for automatic reuse, per server' +VERSION=1.1 \ No newline at end of file diff --git a/plugin-playground/src/main/kotlin/SlayerTrackerPlugin/plugin.kt b/plugin-playground/src/main/kotlin/SlayerTrackerPlugin/plugin.kt index 6efd375..b67fa97 100644 --- a/plugin-playground/src/main/kotlin/SlayerTrackerPlugin/plugin.kt +++ b/plugin-playground/src/main/kotlin/SlayerTrackerPlugin/plugin.kt @@ -10,11 +10,6 @@ import rt4.Sprite import java.awt.Color import java.lang.Exception -@PluginMeta( - author = "Ceikry", - description = "Draws a simple slayer task tracker onto the screen if one is active.", - version = 1.0 -) class plugin : Plugin() { val boxColor = 6116423 val posX = 5 diff --git a/plugin-playground/src/main/kotlin/SlayerTrackerPlugin/plugin.properties b/plugin-playground/src/main/kotlin/SlayerTrackerPlugin/plugin.properties new file mode 100644 index 0000000..18af559 --- /dev/null +++ b/plugin-playground/src/main/kotlin/SlayerTrackerPlugin/plugin.properties @@ -0,0 +1,3 @@ +AUTHOR='Ceikry' +DESCRIPTION='Draws a simple slayer task tracker onto the screen if one is active.' +VERSION=1.0 \ No newline at end of file diff --git a/plugin-playground/src/main/kotlin/TabReply/plugin.kt b/plugin-playground/src/main/kotlin/TabReply/plugin.kt index 8cbaf3a..c1cbc4f 100644 --- a/plugin-playground/src/main/kotlin/TabReply/plugin.kt +++ b/plugin-playground/src/main/kotlin/TabReply/plugin.kt @@ -6,11 +6,6 @@ import plugin.api.API import java.awt.event.KeyAdapter import java.awt.event.KeyEvent -@PluginMeta ( - author = "Ceikry", - description = "Allows you to press tab to reply to DMs.", - version = 1.0 -) class plugin : Plugin() { override fun Init() { API.AddKeyboardListener(object : KeyAdapter() { diff --git a/plugin-playground/src/main/kotlin/TabReply/plugin.properties b/plugin-playground/src/main/kotlin/TabReply/plugin.properties new file mode 100644 index 0000000..bf77a72 --- /dev/null +++ b/plugin-playground/src/main/kotlin/TabReply/plugin.properties @@ -0,0 +1,3 @@ +AUTHOR='Ceikry' +DESCRIPTION='Allows you to press tab to reply to DMs.' +VERSION=1.0 \ No newline at end of file diff --git a/plugin-playground/src/main/kotlin/XPDropPlugin/plugin.kt b/plugin-playground/src/main/kotlin/XPDropPlugin/plugin.kt index 6e316a2..24f1feb 100644 --- a/plugin-playground/src/main/kotlin/XPDropPlugin/plugin.kt +++ b/plugin-playground/src/main/kotlin/XPDropPlugin/plugin.kt @@ -6,11 +6,6 @@ import plugin.api.* import java.awt.Color import kotlin.math.ceil -@PluginMeta( - author = "Ceikry", - description = "Draws nice and clean experience drops onto the screen.", - version = 1.2 -) class plugin : Plugin() { private val displayTimeout = 10000L // 10 seconds private val drawStart = 175 diff --git a/plugin-playground/src/main/kotlin/XPDropPlugin/plugin.properties b/plugin-playground/src/main/kotlin/XPDropPlugin/plugin.properties new file mode 100644 index 0000000..35027ea --- /dev/null +++ b/plugin-playground/src/main/kotlin/XPDropPlugin/plugin.properties @@ -0,0 +1,3 @@ +AUTHOR='Ceikry' +DESCRIPTION='Draws nice and clean experience drops onto the screen.' +VERSION=1.2