diff --git a/paper-api/src/main/java/org/bukkit/command/Command.java b/paper-api/src/main/java/org/bukkit/command/Command.java index b0b7f21f1c..1695742527 100644 --- a/paper-api/src/main/java/org/bukkit/command/Command.java +++ b/paper-api/src/main/java/org/bukkit/command/Command.java @@ -350,4 +350,9 @@ public abstract class Command { } } } + + @Override + public String toString() { + return getClass().getName() + '(' + name + ')'; + } } diff --git a/paper-api/src/main/java/org/bukkit/command/PluginCommand.java b/paper-api/src/main/java/org/bukkit/command/PluginCommand.java index f82e3ed368..d34140c303 100644 --- a/paper-api/src/main/java/org/bukkit/command/PluginCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/PluginCommand.java @@ -144,4 +144,12 @@ public final class PluginCommand extends Command implements PluginIdentifiableCo } return completions; } + + @Override + public String toString() { + StringBuilder stringBuilder = new StringBuilder(super.toString()); + stringBuilder.deleteCharAt(stringBuilder.length() - 1); + stringBuilder.append(", ").append(owningPlugin.getDescription().getFullName()).append(')'); + return stringBuilder.toString(); + } }