Compare commits

..

3 commits

3 changed files with 5 additions and 3 deletions

View file

@ -27,7 +27,7 @@ public class Translation {
// Global // Global
public static String GLOBAL_PREFIX = "<dark_gray>[<BRANDING>PickShadow<BRANDING_END><dark_gray>] <reset>"; public static String GLOBAL_PREFIX = "<dark_gray>[<BRANDING>PickShadow<BRANDING_END><dark_gray>] <reset>";
public static String GLOBAL_EXCEPTION = "Ein Fehler ist während der Ausführung des Befehls aufgetreten. Bitte sende eine E-Mail an " + BuildConfiguration.contactName + " (" + BuildConfiguration.contactEmail + ") für die Fehlerbehebung."; public static String GLOBAL_EXCEPTION = "Ein Fehler ist während der Ausführung des Befehls aufgetreten. Bitte sende eine E-Mail an " + BuildConfiguration.contactName + " (" + BuildConfiguration.contactEmail + ") mit allen relevanten Details für die Fehlerbehebung.";
public static String GLOBAL_NOT_ENOUGH_ARGUMENTS = "Zu wenig Argumente. Syntax: <HIGHLIGHT>%usage%"; public static String GLOBAL_NOT_ENOUGH_ARGUMENTS = "Zu wenig Argumente. Syntax: <HIGHLIGHT>%usage%";
public static String GLOBAL_INVALID_ARGUMENT = "Ungültiges Argument. Syntax: <HIGHLIGHT>%usage%"; public static String GLOBAL_INVALID_ARGUMENT = "Ungültiges Argument. Syntax: <HIGHLIGHT>%usage%";
public static String GLOBAL_NOT_A_PLAYER = "Die Serverkonsole kann diesen Aktion nicht ausführen."; public static String GLOBAL_NOT_A_PLAYER = "Die Serverkonsole kann diesen Aktion nicht ausführen.";

View file

@ -117,7 +117,7 @@ public class PluginCommand extends CommandBase {
if (commandSender.hasPermission("atc.commands.pickshadow")) { if (commandSender.hasPermission("atc.commands.pickshadow")) {
ArrayList<String[]> completion = new ArrayList<>(); ArrayList<String[]> completion = new ArrayList<>();
completion.add(new String[]{ "reloadconfig", "reloaddata", "gc", "scheduler", "playerinfo" }); completion.add(new String[]{ "reloadconfig", "reloaddata", "gc", "scheduler", "playerinfo" });
if (args.length > 2) { if (args.length > 1) {
if (args[0].equals("scheduler")) { if (args[0].equals("scheduler")) {
completion.add(new String[]{"minutely", "hourly"}); completion.add(new String[]{"minutely", "hourly"});
} }

View file

@ -20,6 +20,7 @@ package de.pickshadow.plugin.commands;
import de.pickshadow.plugin.classes.CommandBase; import de.pickshadow.plugin.classes.CommandBase;
import de.pickshadow.plugin.base.Translation; import de.pickshadow.plugin.base.Translation;
import de.pickshadow.plugin.classes.Types;
import de.pickshadow.plugin.utils.Miscellaneous; import de.pickshadow.plugin.utils.Miscellaneous;
import de.pickshadow.plugin.utils.TabCompletionHelper; import de.pickshadow.plugin.utils.TabCompletionHelper;
import net.kyori.adventure.text.Component; import net.kyori.adventure.text.Component;
@ -70,7 +71,8 @@ public class SystemInformationCommand extends CommandBase {
sender.sendMessage(Objects.requireNonNull(getMessage(2))); sender.sendMessage(Objects.requireNonNull(getMessage(2)));
break; break;
default: default:
logger.crash("Invalid label \"" + label + "\""); sender.sendMessage(Miscellaneous.format(Translation.GLOBAL_EXCEPTION, Types.FormatType.ERROR));
logger.error("Invalid label \"" + label + "\"");
break; break;
} }
return true; return true;