Revert "Commented out the default description and parameter help for now."

This reverts commit f3442a32ab.
This commit is contained in:
tastybento 2018-08-10 14:57:18 +09:00
parent f3442a32ab
commit 46ae5883a1
6 changed files with 10 additions and 8 deletions

View File

@ -128,8 +128,8 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
plugin.getCommandsManager().registerCommand(this);
}
// Default references to description and parameters
//setDescription("commands." + label + ".description");
//setParametersHelp("commands." + label + ".parameters");
setDescription("commands." + label + ".description");
setParametersHelp("commands." + label + ".parameters");
setup();
if (!getSubCommand("help").isPresent() && !label.equals("help")) {
new DefaultHelpCommand(this);
@ -172,7 +172,7 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
// Inherit world
this.world = parent.getWorld();
// Default references to description and parameters
/*
StringBuilder reference = new StringBuilder();
reference.append("commands");
CompositeCommand p = this;
@ -184,7 +184,7 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
}
setDescription(reference.toString() + ".description");
setParametersHelp(reference.toString() + ".parameters");
*/
setup();
// If this command does not define its own help class, then use the default help command
if (!getSubCommand("help").isPresent() && !label.equals("help")) {

View File

@ -58,6 +58,8 @@ public class DefaultHelpCommand extends CompositeCommand {
}
if (depth < MAX_DEPTH) {
if (!parent.getLabel().equals(HELP)) {
// Get elements
String usage = user.getTranslationOrNothing(parent.getUsage());
String params = user.getTranslationOrNothing(getParameters());

View File

@ -2,8 +2,8 @@ package world.bentobox.bentobox.database.mongodb;
import world.bentobox.bentobox.BentoBox;
import world.bentobox.bentobox.database.AbstractDatabaseHandler;
import world.bentobox.bentobox.database.DatabaseConnectionSettingsImpl;
import world.bentobox.bentobox.database.DatabaseSetup;
import world.bentobox.bentobox.database.DatabaseConnectionSettingsImpl;
public class MongoDBDatabase extends DatabaseSetup {

View File

@ -10,8 +10,8 @@ import com.mongodb.MongoCredential;
import com.mongodb.ServerAddress;
import com.mongodb.client.MongoDatabase;
import world.bentobox.bentobox.database.DatabaseConnectionSettingsImpl;
import world.bentobox.bentobox.database.DatabaseConnector;
import world.bentobox.bentobox.database.DatabaseConnectionSettingsImpl;
public class MongoDBDatabaseConnector implements DatabaseConnector {

View File

@ -2,8 +2,8 @@ package world.bentobox.bentobox.database.mysql;
import world.bentobox.bentobox.BentoBox;
import world.bentobox.bentobox.database.AbstractDatabaseHandler;
import world.bentobox.bentobox.database.DatabaseConnectionSettingsImpl;
import world.bentobox.bentobox.database.DatabaseSetup;
import world.bentobox.bentobox.database.DatabaseConnectionSettingsImpl;
public class MySQLDatabase extends DatabaseSetup {

View File

@ -8,8 +8,8 @@ import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.YamlConfiguration;
import world.bentobox.bentobox.database.DatabaseConnectionSettingsImpl;
import world.bentobox.bentobox.database.DatabaseConnector;
import world.bentobox.bentobox.database.DatabaseConnectionSettingsImpl;
public class MySQLDatabaseConnector implements DatabaseConnector {