From 7072940121e3dbe32ce99781fd345ffab02e2ea3 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Thu, 27 Jul 2017 15:14:07 +0300 Subject: [PATCH] Adds In-depth help messages to commands (/plan ?) --- .../djrapitops/plan/command/PlanCommand.java | 20 ++++++++++++++++ .../plan/command/commands/AnalyzeCommand.java | 22 +++++++++++++++++- .../plan/command/commands/InspectCommand.java | 22 +++++++++++++++++- .../plan/command/commands/ListCommand.java | 22 +++++++++++++++++- .../plan/command/commands/ManageCommand.java | 21 +++++++++++++++++ .../command/commands/QuickAnalyzeCommand.java | 22 +++++++++++++++++- .../command/commands/QuickInspectCommand.java | 22 +++++++++++++++++- .../command/commands/RegisterCommand.java | 20 ++++++++++++++++ .../plan/command/commands/SearchCommand.java | 19 +++++++++++++++ .../plan/command/commands/WebUserCommand.java | 23 +++++++++++++++++++ .../commands/manage/ManageClearCommand.java | 21 +++++++++++++++++ .../commands/manage/ManageHotswapCommand.java | 19 +++++++++++++++ .../commands/manage/ManageImportCommand.java | 20 ++++++++++++++++ .../commands/manage/ManageRemoveCommand.java | 18 +++++++++++++++ 14 files changed, 286 insertions(+), 5 deletions(-) diff --git a/Plan/src/main/java/com/djrapitops/plan/command/PlanCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/PlanCommand.java index cdd3edb5c..fbf2b4b8c 100644 --- a/Plan/src/main/java/com/djrapitops/plan/command/PlanCommand.java +++ b/Plan/src/main/java/com/djrapitops/plan/command/PlanCommand.java @@ -3,6 +3,8 @@ package main.java.com.djrapitops.plan.command; import com.djrapitops.plugin.command.CommandType; import com.djrapitops.plugin.command.TreeCommand; import com.djrapitops.plugin.command.defaultcmds.StatusCommand; +import com.djrapitops.plugin.settings.ColorScheme; +import com.djrapitops.plugin.settings.DefaultMessages; import main.java.com.djrapitops.plan.Permissions; import main.java.com.djrapitops.plan.Plan; import main.java.com.djrapitops.plan.command.commands.*; @@ -27,6 +29,24 @@ public class PlanCommand extends TreeCommand { public PlanCommand(Plan plugin) { super(plugin, "plan", CommandType.CONSOLE, "", "", "plan"); super.setDefaultCommand("inspect"); + setHelp(plugin); + } + + private void setHelp(Plan plugin) { + ColorScheme colorScheme = plugin.getColorScheme(); + + String ball = DefaultMessages.BALL.toString(); + + String mCol = colorScheme.getMainColor(); + String sCol = colorScheme.getSecondaryColor(); + String tCol = colorScheme.getTertiaryColor(); + + String[] help = new String[]{ + mCol +"/plan - Main Command", + tCol+" Used to access all SubCommands & help", + sCol+" /plan - List subcommands", + sCol+" /plan ? - in depth help" + }; } @Override diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/AnalyzeCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/AnalyzeCommand.java index 1e1715e50..80a0d742b 100644 --- a/Plan/src/main/java/com/djrapitops/plan/command/commands/AnalyzeCommand.java +++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/AnalyzeCommand.java @@ -5,6 +5,8 @@ import com.djrapitops.plugin.command.CommandType; import com.djrapitops.plugin.command.CommandUtils; import com.djrapitops.plugin.command.ISender; import com.djrapitops.plugin.command.SubCommand; +import com.djrapitops.plugin.settings.ColorScheme; +import com.djrapitops.plugin.settings.DefaultMessages; import com.djrapitops.plugin.task.AbsRunnable; import main.java.com.djrapitops.plan.*; import main.java.com.djrapitops.plan.command.ConditionUtils; @@ -32,9 +34,27 @@ public class AnalyzeCommand extends SubCommand { * @param plugin Current instance of Plan */ public AnalyzeCommand(Plan plugin) { - super("analyze, analyse, analysis", CommandType.CONSOLE, Permissions.ANALYZE.getPermission(), Phrase.CMD_USG_ANALYZE.parse()); + super("analyze, analyse, analysis, a", CommandType.CONSOLE, Permissions.ANALYZE.getPermission(), Phrase.CMD_USG_ANALYZE.parse()); this.plugin = plugin; analysisCache = plugin.getAnalysisCache(); + setHelp(plugin); + } + + private void setHelp(Plan plugin) { + ColorScheme colorScheme = plugin.getColorScheme(); + + String ball = DefaultMessages.BALL.toString(); + + String mCol = colorScheme.getMainColor(); + String sCol = colorScheme.getSecondaryColor(); + String tCol = colorScheme.getTertiaryColor(); + + String[] help = new String[]{ + mCol +"Analysis Command", + tCol+" Used to Refresh analysis cache & Access the result page", + sCol+" /plan status can be used to check status of analysis while it is running.", + sCol+" Aliases: analyze, analyse, analysis, a" + }; } @Override diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/InspectCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/InspectCommand.java index 2ac3642c9..6a45ada52 100644 --- a/Plan/src/main/java/com/djrapitops/plan/command/commands/InspectCommand.java +++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/InspectCommand.java @@ -5,6 +5,8 @@ import com.djrapitops.plugin.command.CommandType; import com.djrapitops.plugin.command.CommandUtils; import com.djrapitops.plugin.command.ISender; import com.djrapitops.plugin.command.SubCommand; +import com.djrapitops.plugin.settings.ColorScheme; +import com.djrapitops.plugin.settings.DefaultMessages; import com.djrapitops.plugin.task.AbsRunnable; import com.djrapitops.plugin.utilities.Verify; import main.java.com.djrapitops.plan.*; @@ -41,6 +43,24 @@ public class InspectCommand extends SubCommand { this.plugin = plugin; inspectCache = plugin.getInspectCache(); + setHelp(plugin); + } + + private void setHelp(Plan plugin) { + ColorScheme colorScheme = plugin.getColorScheme(); + + String ball = DefaultMessages.BALL.toString(); + + String mCol = colorScheme.getMainColor(); + String sCol = colorScheme.getSecondaryColor(); + String tCol = colorScheme.getTertiaryColor(); + + String[] help = new String[]{ + mCol +"Inspect command", + tCol+" Used to get a link to User's inspect page.", + sCol+" Own inspect page can be accessed with /plan inspect", + sCol+" Alias: /plan " + }; } @Override @@ -133,4 +153,4 @@ public class InspectCommand extends SubCommand { sender.sendMessage(Phrase.CMD_FOOTER + ""); } -} +} \ No newline at end of file diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/ListCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/ListCommand.java index 41054e8b5..06cb62242 100644 --- a/Plan/src/main/java/com/djrapitops/plan/command/commands/ListCommand.java +++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/ListCommand.java @@ -4,6 +4,8 @@ import com.djrapitops.plugin.command.CommandType; import com.djrapitops.plugin.command.CommandUtils; import com.djrapitops.plugin.command.ISender; import com.djrapitops.plugin.command.SubCommand; +import com.djrapitops.plugin.settings.ColorScheme; +import com.djrapitops.plugin.settings.DefaultMessages; import main.java.com.djrapitops.plan.Permissions; import main.java.com.djrapitops.plan.Phrase; import main.java.com.djrapitops.plan.Plan; @@ -29,9 +31,27 @@ public class ListCommand extends SubCommand { * @param plugin Current instance of Plan */ public ListCommand(Plan plugin) { - super("list", CommandType.CONSOLE, Permissions.INSPECT_OTHER.getPermission(), "List to all cached players", ""); + super("list, pl", CommandType.CONSOLE, Permissions.INSPECT_OTHER.getPermission(), "List to all cached players", ""); this.plugin = plugin; + setHelp(plugin); + } + + private void setHelp(Plan plugin) { + ColorScheme colorScheme = plugin.getColorScheme(); + + String ball = DefaultMessages.BALL.toString(); + + String mCol = colorScheme.getMainColor(); + String sCol = colorScheme.getSecondaryColor(); + String tCol = colorScheme.getTertiaryColor(); + + String[] help = new String[]{ + mCol +"List command", + tCol+" Used to get a link to players page.", + sCol+" Players page contains links to all cached inspect pages.", + sCol+" Alias: /plan pl" + }; } @Override diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/ManageCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/ManageCommand.java index 8cc6fa2b5..61d424170 100644 --- a/Plan/src/main/java/com/djrapitops/plan/command/commands/ManageCommand.java +++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/ManageCommand.java @@ -2,6 +2,8 @@ package main.java.com.djrapitops.plan.command.commands; import com.djrapitops.plugin.command.CommandType; import com.djrapitops.plugin.command.TreeCommand; +import com.djrapitops.plugin.settings.ColorScheme; +import com.djrapitops.plugin.settings.DefaultMessages; import main.java.com.djrapitops.plan.Permissions; import main.java.com.djrapitops.plan.Phrase; import main.java.com.djrapitops.plan.Plan; @@ -24,6 +26,25 @@ public class ManageCommand extends TreeCommand { */ public ManageCommand(Plan plugin) { super(plugin, "manage,m", CommandType.CONSOLE, Permissions.MANAGE.getPermission(), Phrase.CMD_USG_MANAGE + "", "plan m"); + setHelp(plugin); + } + + private void setHelp(Plan plugin) { + ColorScheme colorScheme = plugin.getColorScheme(); + + String ball = DefaultMessages.BALL.toString(); + + String mCol = colorScheme.getMainColor(); + String sCol = colorScheme.getSecondaryColor(); + String tCol = colorScheme.getTertiaryColor(); + + String[] help = new String[]{ + mCol +"Manage command", + tCol+" Used to Manage Database of the plugin.", + sCol+" Alias: /plan m", + sCol+" /plan m - List subcommands", + sCol+" /plan m ? - in depth help" + }; } @Override diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/QuickAnalyzeCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/QuickAnalyzeCommand.java index 5dc463a20..acbe0109c 100644 --- a/Plan/src/main/java/com/djrapitops/plan/command/commands/QuickAnalyzeCommand.java +++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/QuickAnalyzeCommand.java @@ -4,6 +4,8 @@ import com.djrapitops.plugin.api.TimeAmount; import com.djrapitops.plugin.command.CommandType; import com.djrapitops.plugin.command.ISender; import com.djrapitops.plugin.command.SubCommand; +import com.djrapitops.plugin.settings.ColorScheme; +import com.djrapitops.plugin.settings.DefaultMessages; import com.djrapitops.plugin.task.AbsRunnable; import main.java.com.djrapitops.plan.Log; import main.java.com.djrapitops.plan.Permissions; @@ -33,9 +35,27 @@ public class QuickAnalyzeCommand extends SubCommand { * @param plugin Current instance of Plan */ public QuickAnalyzeCommand(Plan plugin) { - super("qanalyze, qanalyse, qanalysis", CommandType.CONSOLE, Permissions.QUICK_ANALYZE.getPermission(), Phrase.CMD_USG_QANALYZE.parse()); + super("qanalyze, qanalyse, qanalysis, qa", CommandType.CONSOLE, Permissions.QUICK_ANALYZE.getPermission(), Phrase.CMD_USG_QANALYZE.parse()); this.plugin = plugin; analysisCache = plugin.getAnalysisCache(); + setHelp(plugin); + } + + private void setHelp(Plan plugin) { + ColorScheme colorScheme = plugin.getColorScheme(); + + String ball = DefaultMessages.BALL.toString(); + + String mCol = colorScheme.getMainColor(); + String sCol = colorScheme.getSecondaryColor(); + String tCol = colorScheme.getTertiaryColor(); + + String[] help = new String[]{ + mCol +"Quick Analysis command", + tCol+" Used to get in game info about analysis.", + sCol+" Has less info than full Analysis web page.", + sCol+" Aliases: qanalyze, ganalyse, qanalysis, qa" + }; } @Override diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/QuickInspectCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/QuickInspectCommand.java index 2f93744e9..685da9517 100644 --- a/Plan/src/main/java/com/djrapitops/plan/command/commands/QuickInspectCommand.java +++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/QuickInspectCommand.java @@ -4,6 +4,8 @@ import com.djrapitops.plugin.api.TimeAmount; import com.djrapitops.plugin.command.CommandType; import com.djrapitops.plugin.command.ISender; import com.djrapitops.plugin.command.SubCommand; +import com.djrapitops.plugin.settings.ColorScheme; +import com.djrapitops.plugin.settings.DefaultMessages; import com.djrapitops.plugin.task.AbsRunnable; import com.djrapitops.plugin.utilities.Verify; import main.java.com.djrapitops.plan.Log; @@ -37,10 +39,28 @@ public class QuickInspectCommand extends SubCommand { * @param plugin Current instance of Plan */ public QuickInspectCommand(Plan plugin) { - super("qinspect", CommandType.CONSOLE_WITH_ARGUMENTS, Permissions.QUICK_INSPECT.getPermission(), Phrase.CMD_USG_QINSPECT + "", Phrase.ARG_PLAYER + ""); + super("qinspect, qi", CommandType.CONSOLE_WITH_ARGUMENTS, Permissions.QUICK_INSPECT.getPermission(), Phrase.CMD_USG_QINSPECT + "", Phrase.ARG_PLAYER + ""); this.plugin = plugin; inspectCache = plugin.getInspectCache(); + setHelp(plugin); + } + + private void setHelp(Plan plugin) { + ColorScheme colorScheme = plugin.getColorScheme(); + + String ball = DefaultMessages.BALL.toString(); + + String mCol = colorScheme.getMainColor(); + String sCol = colorScheme.getSecondaryColor(); + String tCol = colorScheme.getTertiaryColor(); + + String[] help = new String[]{ + mCol +"Quick Inspect command", + tCol+" Used to get some inspect info in game.", + sCol+" Has less info than full Inspect web page.", + sCol+" Alias: /plan qi" + }; } @Override diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/RegisterCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/RegisterCommand.java index 93bf024d1..50b090409 100644 --- a/Plan/src/main/java/com/djrapitops/plan/command/commands/RegisterCommand.java +++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/RegisterCommand.java @@ -4,6 +4,8 @@ import com.djrapitops.plugin.command.CommandType; import com.djrapitops.plugin.command.CommandUtils; import com.djrapitops.plugin.command.ISender; import com.djrapitops.plugin.command.SubCommand; +import com.djrapitops.plugin.settings.ColorScheme; +import com.djrapitops.plugin.settings.DefaultMessages; import com.djrapitops.plugin.task.AbsRunnable; import main.java.com.djrapitops.plan.Log; import main.java.com.djrapitops.plan.Permissions; @@ -34,6 +36,24 @@ public class RegisterCommand extends SubCommand { public RegisterCommand(Plan plugin) { super("register", CommandType.CONSOLE_WITH_ARGUMENTS, "", "Register a user for the webserver", " [name] [access lvl]"); this.plugin = plugin; + setHelp(plugin); + } + + private void setHelp(Plan plugin) { + ColorScheme colorScheme = plugin.getColorScheme(); + + String ball = DefaultMessages.BALL.toString(); + + String mCol = colorScheme.getMainColor(); + String sCol = colorScheme.getSecondaryColor(); + String tCol = colorScheme.getTertiaryColor(); + + String[] help = new String[]{ + mCol +"Web Register command", + tCol+" Used to register a new user for the webserver.", + sCol+" Registering a user for another player requires "+Permissions.MANAGE_WEB.getPerm()+" permission.", + sCol+" Passwords are hashed with PBKDF2 (64,000 iterations of SHA1) using a cryptographically-random salt." + }; } @Override diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/SearchCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/SearchCommand.java index 523be03d7..e0f55a04e 100644 --- a/Plan/src/main/java/com/djrapitops/plan/command/commands/SearchCommand.java +++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/SearchCommand.java @@ -3,6 +3,8 @@ package main.java.com.djrapitops.plan.command.commands; import com.djrapitops.plugin.command.CommandType; import com.djrapitops.plugin.command.ISender; import com.djrapitops.plugin.command.SubCommand; +import com.djrapitops.plugin.settings.ColorScheme; +import com.djrapitops.plugin.settings.DefaultMessages; import com.djrapitops.plugin.task.AbsRunnable; import com.djrapitops.plugin.utilities.FormattingUtils; import main.java.com.djrapitops.plan.Permissions; @@ -32,6 +34,23 @@ public class SearchCommand extends SubCommand { public SearchCommand(Plan plugin) { super("search", CommandType.CONSOLE_WITH_ARGUMENTS, Permissions.SEARCH.getPermission(), Phrase.CMD_USG_SEARCH + "", Phrase.ARG_SEARCH + ""); this.plugin = plugin; + setHelp(plugin); + } + + private void setHelp(Plan plugin) { + ColorScheme colorScheme = plugin.getColorScheme(); + + String ball = DefaultMessages.BALL.toString(); + + String mCol = colorScheme.getMainColor(); + String sCol = colorScheme.getSecondaryColor(); + String tCol = colorScheme.getTertiaryColor(); + + String[] help = new String[]{ + mCol +"Search command", + tCol+" Used to get a list of Player names that match the given argument.", + sCol+" Example: /plan search 123 - Finds all users with 123 in their name." + }; } @Override diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/WebUserCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/WebUserCommand.java index b2f485de3..a555ac659 100644 --- a/Plan/src/main/java/com/djrapitops/plan/command/commands/WebUserCommand.java +++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/WebUserCommand.java @@ -2,6 +2,8 @@ package main.java.com.djrapitops.plan.command.commands; import com.djrapitops.plugin.command.CommandType; import com.djrapitops.plugin.command.TreeCommand; +import com.djrapitops.plugin.settings.ColorScheme; +import com.djrapitops.plugin.settings.DefaultMessages; import main.java.com.djrapitops.plan.Permissions; import main.java.com.djrapitops.plan.Plan; import main.java.com.djrapitops.plan.command.commands.webuser.WebCheckCommand; @@ -20,6 +22,27 @@ public class WebUserCommand extends TreeCommand { public WebUserCommand(Plan plugin, RegisterCommand register) { super(plugin, "webuser, web", CommandType.CONSOLE, Permissions.MANAGE_WEB.getPerm(), "Manage Webusers", "plan web"); commands.add(register); + setHelp(plugin); + } + + private void setHelp(Plan plugin) { + ColorScheme colorScheme = plugin.getColorScheme(); + + String ball = DefaultMessages.BALL.toString(); + + String mCol = colorScheme.getMainColor(); + String sCol = colorScheme.getSecondaryColor(); + String tCol = colorScheme.getTertiaryColor(); + + String[] help = new String[]{ + mCol +"Web User Manage command", + tCol+" Used to manage web users of the plugin", + sCol+" Users have a permission level:", + tCol+" 0 - Access to all pages", + tCol+" 1 - Access to /players & all inspect pages", + tCol+" 2 - Access to own inspect page", + sCol+" Alias: /plan web" + }; } @Override diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageClearCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageClearCommand.java index 4bbe0ae39..3aeffddde 100644 --- a/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageClearCommand.java +++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageClearCommand.java @@ -3,6 +3,8 @@ package main.java.com.djrapitops.plan.command.commands.manage; import com.djrapitops.plugin.command.CommandType; import com.djrapitops.plugin.command.ISender; import com.djrapitops.plugin.command.SubCommand; +import com.djrapitops.plugin.settings.ColorScheme; +import com.djrapitops.plugin.settings.DefaultMessages; import com.djrapitops.plugin.task.AbsRunnable; import com.djrapitops.plugin.utilities.Verify; import main.java.com.djrapitops.plan.Log; @@ -32,6 +34,24 @@ public class ManageClearCommand extends SubCommand { super("clear", CommandType.CONSOLE_WITH_ARGUMENTS, Permissions.MANAGE.getPermission(), Phrase.CMD_USG_MANAGE_CLEAR + "", " [-a]"); this.plugin = plugin; + setHelp(plugin); + } + + private void setHelp(Plan plugin) { + ColorScheme colorScheme = plugin.getColorScheme(); + + String ball = DefaultMessages.BALL.toString(); + + String mCol = colorScheme.getMainColor(); + String sCol = colorScheme.getSecondaryColor(); + String tCol = colorScheme.getTertiaryColor(); + + String[] help = new String[]{ + mCol +"Manage Clear command", + tCol+" Used to delete ALL data in the active database.", + sCol+" Plugin should be reloaded after successful clear.", + sCol+" Alias: /plan pl" + }; } @Override @@ -71,6 +91,7 @@ public class ManageClearCommand extends SubCommand { sender.sendMessage(Phrase.MANAGE_PROCESS_START.parse()); if (database.removeAllData()) { + plugin.getHandler().getDataCache().clear(); sender.sendMessage(Phrase.MANAGE_CLEAR_SUCCESS.toString()); } else { sender.sendMessage(Phrase.MANAGE_PROCESS_FAIL.toString()); diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageHotswapCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageHotswapCommand.java index b9bf70b64..e89b1a06f 100644 --- a/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageHotswapCommand.java +++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageHotswapCommand.java @@ -3,6 +3,8 @@ package main.java.com.djrapitops.plan.command.commands.manage; import com.djrapitops.plugin.command.CommandType; import com.djrapitops.plugin.command.ISender; import com.djrapitops.plugin.command.SubCommand; +import com.djrapitops.plugin.settings.ColorScheme; +import com.djrapitops.plugin.settings.DefaultMessages; import com.djrapitops.plugin.utilities.Verify; import main.java.com.djrapitops.plan.Log; import main.java.com.djrapitops.plan.Permissions; @@ -32,6 +34,23 @@ public class ManageHotswapCommand extends SubCommand { super("hotswap", CommandType.CONSOLE_WITH_ARGUMENTS, Permissions.MANAGE.getPermission(), Phrase.CMD_USG_MANAGE_HOTSWAP.toString(), ""); this.plugin = plugin; + setHelp(plugin); + } + + private void setHelp(Plan plugin) { + ColorScheme colorScheme = plugin.getColorScheme(); + + String ball = DefaultMessages.BALL.toString(); + + String mCol = colorScheme.getMainColor(); + String sCol = colorScheme.getSecondaryColor(); + String tCol = colorScheme.getTertiaryColor(); + + String[] help = new String[]{ + mCol +"Manage Hotswap command", + tCol+" Used to change database in use on the fly.", + sCol+" Does not change database if connection fails" + }; } @Override diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageImportCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageImportCommand.java index 5ac186290..08367a022 100644 --- a/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageImportCommand.java +++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageImportCommand.java @@ -3,6 +3,8 @@ package main.java.com.djrapitops.plan.command.commands.manage; import com.djrapitops.plugin.command.CommandType; import com.djrapitops.plugin.command.ISender; import com.djrapitops.plugin.command.SubCommand; +import com.djrapitops.plugin.settings.ColorScheme; +import com.djrapitops.plugin.settings.DefaultMessages; import com.djrapitops.plugin.task.AbsRunnable; import com.djrapitops.plugin.utilities.FormattingUtils; import com.djrapitops.plugin.utilities.player.Fetch; @@ -39,6 +41,24 @@ public class ManageImportCommand extends SubCommand { public ManageImportCommand(Plan plugin) { super("import", CommandType.CONSOLE, Permissions.MANAGE.getPermission(), Phrase.CMD_USG_MANAGE_IMPORT.toString(), Phrase.ARG_IMPORT.toString()); this.plugin = plugin; + setHelp(plugin); + } + + private void setHelp(Plan plugin) { + ColorScheme colorScheme = plugin.getColorScheme(); + + String ball = DefaultMessages.BALL.toString(); + + String mCol = colorScheme.getMainColor(); + String sCol = colorScheme.getSecondaryColor(); + String tCol = colorScheme.getTertiaryColor(); + + String[] help = new String[]{ + mCol +"Manage Import command", + tCol+" Used to import data from other sources", + sCol+" Analysis will be disabled during import.", + sCol+" If a lot of users are not in the database, saving may take a long time." + }; } @Override diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageRemoveCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageRemoveCommand.java index e5796468e..c8ec111f4 100644 --- a/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageRemoveCommand.java +++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageRemoveCommand.java @@ -3,6 +3,8 @@ package main.java.com.djrapitops.plan.command.commands.manage; import com.djrapitops.plugin.command.CommandType; import com.djrapitops.plugin.command.ISender; import com.djrapitops.plugin.command.SubCommand; +import com.djrapitops.plugin.settings.ColorScheme; +import com.djrapitops.plugin.settings.DefaultMessages; import com.djrapitops.plugin.task.AbsRunnable; import com.djrapitops.plugin.utilities.Verify; import main.java.com.djrapitops.plan.Log; @@ -35,6 +37,22 @@ public class ManageRemoveCommand extends SubCommand { super("remove", CommandType.CONSOLE_WITH_ARGUMENTS, Permissions.MANAGE.getPermission(), Phrase.CMD_USG_MANAGE_REMOVE.toString(), Phrase.ARG_PLAYER + " [-a]"); this.plugin = plugin; + setHelp(plugin); + } + + private void setHelp(Plan plugin) { + ColorScheme colorScheme = plugin.getColorScheme(); + + String ball = DefaultMessages.BALL.toString(); + + String mCol = colorScheme.getMainColor(); + String sCol = colorScheme.getSecondaryColor(); + String tCol = colorScheme.getTertiaryColor(); + + String[] help = new String[]{ + mCol +"Manage Remove command", + tCol+" Used to Remove user's data from the active database." + }; } @Override