diff --git a/node/src/main/java/eu/cloudnetservice/node/command/source/ConsoleCommandSource.java b/node/src/main/java/eu/cloudnetservice/node/command/source/ConsoleCommandSource.java index 6120d27841..b1657cec70 100644 --- a/node/src/main/java/eu/cloudnetservice/node/command/source/ConsoleCommandSource.java +++ b/node/src/main/java/eu/cloudnetservice/node/command/source/ConsoleCommandSource.java @@ -30,7 +30,7 @@ public class ConsoleCommandSource implements CommandSource { private static final Logger LOGGER = LogManager.logger(ConsoleCommandSource.class); /** - * @return "Console" for the console command source. + * {@inheritDoc} */ @Override public @NonNull String name() { @@ -74,4 +74,12 @@ public void sendMessage(@NonNull Collection messages) { public boolean checkPermission(@NonNull String permission) { return true; } + + /** + * {@inheritDoc} + */ + @Override + public @NonNull String toString() { + return this.name(); + } } diff --git a/node/src/main/java/eu/cloudnetservice/node/command/source/DriverCommandSource.java b/node/src/main/java/eu/cloudnetservice/node/command/source/DriverCommandSource.java index a8f420a960..72d373fd96 100644 --- a/node/src/main/java/eu/cloudnetservice/node/command/source/DriverCommandSource.java +++ b/node/src/main/java/eu/cloudnetservice/node/command/source/DriverCommandSource.java @@ -38,7 +38,7 @@ public class DriverCommandSource implements CommandSource { private final Collection messages = new ArrayList<>(); /** - * @return "Driver" for the driver command source. + * {@inheritDoc} */ @Override public @NonNull String name() { @@ -86,6 +86,17 @@ public boolean checkPermission(@NonNull String permission) { return this.messages; } + /** + * {@inheritDoc} + */ + @Override + public @NonNull String toString() { + return this.name(); + } + + /** + * {@inheritDoc} + */ @Override public boolean equals(Object o) { if (this == o) { @@ -97,6 +108,9 @@ public boolean equals(Object o) { return that.name().equals(this.name()); } + /** + * {@inheritDoc} + */ @Override public int hashCode() { return Objects.hash(this.name()); diff --git a/node/src/main/java/eu/cloudnetservice/node/permission/command/PermissionUserCommandSource.java b/node/src/main/java/eu/cloudnetservice/node/permission/command/PermissionUserCommandSource.java index 4b5237f6ac..a9a4a7106d 100644 --- a/node/src/main/java/eu/cloudnetservice/node/permission/command/PermissionUserCommandSource.java +++ b/node/src/main/java/eu/cloudnetservice/node/permission/command/PermissionUserCommandSource.java @@ -60,4 +60,12 @@ public PermissionUserCommandSource( public boolean checkPermission(@NonNull String permission) { return this.permissionManagement.hasPermission(this.permissionUser, Permission.of(permission)); } + + /** + * {@inheritDoc} + */ + @Override + public @NonNull String toString() { + return this.name(); + } } diff --git a/node/src/main/resources/lang/en_US.properties b/node/src/main/resources/lang/en_US.properties index 6d77ca3283..04e9f2b393 100644 --- a/node/src/main/resources/lang/en_US.properties +++ b/node/src/main/resources/lang/en_US.properties @@ -119,7 +119,7 @@ cloudnet-post-unload-module=Module {0$module_group$}:{1$module_name$}:{2$module_ command-no-description=No command description provided command-confirmation-no-requests=There are no commands to confirm command-confirmation-required=Please confirm executing the command by executing ''&bconfirm&r'' within 30s -invalid-command-sender=This command can be executed using the '{0$source$}' only +invalid-command-sender=This command cannot be executed by ''{0$source$}'' invalid-command-syntax=Invalid syntax! Use {0$syntax$} no-such-command=Command could not be found! For help, use the command "help" argument-parse-failure-no-input-was-provided=No input provided