From cb4b081672f5dbaa892d945427e6fe143309ba70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Pani=C4=87?= Date: Sun, 10 Feb 2019 00:44:06 +0100 Subject: Added bin folder to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 956145f..67cd9d6 100644 --- a/.gitignore +++ b/.gitignore @@ -123,6 +123,7 @@ hs_err_pid* ### Gradle ### .gradle build/ +bin/ # Ignore Gradle GUI config gradle-app.setting -- cgit v1.2.3 From d67e0015b67614c8c53826a598b8a26a0b3a2e8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Pani=C4=87?= Date: Sun, 10 Feb 2019 01:07:29 +0100 Subject: Fixed gradle resources --- build.gradle | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/build.gradle b/build.gradle index 5d62467..a1ece9c 100644 --- a/build.gradle +++ b/build.gradle @@ -36,4 +36,16 @@ jar { task sourceJar(type: Jar, dependsOn: classes) { classifier 'sources' from sourceSets.main.allSource +} + +sourceSets { + main { + resources { + srcDir 'src/main/java' + include '**/*.cmd' + + srcDir 'src/main/resources' + include '**/*.yml' + } + } } \ No newline at end of file -- cgit v1.2.3 From ec716782e278dc92e3e3c75e036f08a345422d25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Pani=C4=87?= Date: Sun, 10 Feb 2019 02:16:04 +0100 Subject: Made versions show directly in chat if you add -v to /modules --- .../com/redstoner/coremods/moduleLoader/ModuleLoader.cmd | 12 ++++++++++++ .../redstoner/coremods/moduleLoader/ModuleLoader.java | 16 +++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/redstoner/coremods/moduleLoader/ModuleLoader.cmd b/src/main/java/com/redstoner/coremods/moduleLoader/ModuleLoader.cmd index 4e06bd0..69dd38d 100644 --- a/src/main/java/com/redstoner/coremods/moduleLoader/ModuleLoader.cmd +++ b/src/main/java/com/redstoner/coremods/moduleLoader/ModuleLoader.cmd @@ -4,10 +4,22 @@ command modules { perm moduleloader.modules.list; run list; } + -v { + help Lists all modules and their versions. Color indicates status: §aENABLED §cDISABLED; + perm moduleloader.modules.list; + run listversions; + } + + list { help Lists all modules. Color indicates status: §aENABLED §cDISABLED; perm moduleloader.modules.list; run list; + } + list -v { + help Lists all modules and their versions. Color indicates status: §aENABLED §cDISABLED; + perm moduleloader.modules.list; + run listversions; } load [string:name...] { help (Re)-Loads a module. WARNING: Handle with care! This has direct affect on code being executed. This command will temporarily halt the main thread until the class loading operation was completed.; diff --git a/src/main/java/com/redstoner/coremods/moduleLoader/ModuleLoader.java b/src/main/java/com/redstoner/coremods/moduleLoader/ModuleLoader.java index bdf8091..ec478a0 100644 --- a/src/main/java/com/redstoner/coremods/moduleLoader/ModuleLoader.java +++ b/src/main/java/com/redstoner/coremods/moduleLoader/ModuleLoader.java @@ -561,15 +561,25 @@ public final class ModuleLoader implements CoreModule { return Main.plugin; } + @Command (hook = "list", async = AsyncType.ALWAYS) + public boolean listModulesCommand(CommandSender sender) { + return listModules(sender, false); + } + + @Command (hook = "listversions", async = AsyncType.ALWAYS) + public boolean listModulesVerionsCommand(CommandSender sender) { + return listModules(sender, true); + } + /** * This method lists all modules to the specified CommandSender. The modules will be color coded correspondingly to their enabled status. * * @param sender The person to send the info to, usually the issuer of the command or the console sender. + * @param showVersions Should we show the versions directly in chat. * * @return true. */ - @Command (hook = "list", async = AsyncType.ALWAYS) - public boolean listModulesCommand(CommandSender sender) { + public boolean listModules(CommandSender sender, boolean showVersions) { boolean hasCategorys = hasCategories(); Message m = new Message(sender, null); ModuleInfo ml_info = moduleInfos.get(instance); @@ -587,7 +597,7 @@ public final class ModuleLoader implements CoreModule { for (Module mod : mods) { ModuleInfo info = moduleInfos.get(mod); - m.appendTextHover((modules.get(mod) ? "§a" : "§c") + info.getDisplayName(), info.getModuleInfoHover()); + m.appendTextHover((modules.get(mod) ? "§a" : "§c") + info.getDisplayName() + (showVersions ? " &e" + info.getVersion() : ""), info.getModuleInfoHover()); if (curModule != mods.size()) m.appendText("&7, "); -- cgit v1.2.3 From 7d3e2a04b2d7603e446cb898633a203d7bcba4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Pani=C4=87?= Date: Wed, 17 Apr 2019 19:55:42 +0200 Subject: Bumped version + added devs as authors --- src/main/resources/plugin.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 404bd2b..fc576a8 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: ModuleLoader -version: 5.2.1 -authors: [pepich1851] +version: 5.2.2 +authors: [pepich1851, psrcek, LogalDeveloper, Minenash] main: com.redstoner.misc.Main -softdepend: [Vault] \ No newline at end of file +softdepend: [Vault] -- cgit v1.2.3