From 8726052187286d3c9dc36f0600e0c307a74f1ce7 Mon Sep 17 00:00:00 2001 From: Zrips Date: Thu, 15 Feb 2018 13:07:42 +0200 Subject: [PATCH] Option to customize base command label in help page --- pom.xml | 2 +- .../com/gamingmesh/jobs/commands/JobsCommands.java | 2 +- .../com/gamingmesh/jobs/config/LanguageManager.java | 1 + src/main/resources/plugin.yml | 10 ++++++++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 2034de70..859908c8 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 Jobs jobs - 4.4.0 + 4.5.0 Jobs http://maven.apache.org diff --git a/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java b/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java index 2922012c..ef2f79b0 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java +++ b/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java @@ -132,7 +132,7 @@ public class JobsCommands implements CommandExecutor { } private static String getUsage(String cmd) { - String cmdString = Jobs.getLanguage().getMessage("command.help.output.cmdFormat", "[command]", label + " " + cmd); + String cmdString = Jobs.getLanguage().getMessage("command.help.output.cmdFormat", "[command]", Jobs.getLanguage().getMessage("command.help.output.label") + " " + cmd); String key = "command." + cmd + ".help.args"; if (Jobs.getLanguage().containsKey(key) && !Jobs.getLanguage().getMessage(key).isEmpty()) { cmdString = cmdString.replace("[arguments]", " " + Jobs.getLanguage().getMessage(key)); diff --git a/src/main/java/com/gamingmesh/jobs/config/LanguageManager.java b/src/main/java/com/gamingmesh/jobs/config/LanguageManager.java index b66fdcdc..e4c399ef 100644 --- a/src/main/java/com/gamingmesh/jobs/config/LanguageManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/LanguageManager.java @@ -147,6 +147,7 @@ public class LanguageManager { c.get("command.help.output.info", "Type /jobs [cmd] ? for more information about a command."); c.get("command.help.output.cmdUsage", "&2Usage: &7[command]"); + c.get("command.help.output.label", "Jobs"); c.get("command.help.output.cmdInfoFormat", "[command] &f- &2[description]"); c.get("command.help.output.cmdFormat", "&7/[command]&f[arguments]"); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 0e3a09cd..e3665f59 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,7 +1,7 @@ name: Jobs description: Jobs Plugin for the BukkitAPI main: com.gamingmesh.jobs.Jobs -version: 4.4.0 +version: 4.5.0 website: https://www.spigotmc.org/resources/jobs-reborn.4216/ author: phrstbrn softdepend: [Vault, iConomy, MythicMobs, McMMO, WorldGuard, MyPet] @@ -183,4 +183,10 @@ permissions: default: true jobs.command.clearownership: description: Grants access to the clearownership command - default: true \ No newline at end of file + default: true + jobs.command.itembonus: + description: Grants access to the itembonus command + default: true + jobs.command.edititembonus: + description: Grants access to the edititembonus command + default: op \ No newline at end of file