mirror of
https://github.com/aikar/commands.git
synced 2026-05-31 06:11:55 +00:00
Fix Bukkit Description being null, supply usage/description to Sponge/Bungee
This commit is contained in:
@@ -77,7 +77,8 @@ public class SpongeRootCommand implements CommandCallable, RootCommand {
|
||||
|
||||
@Override
|
||||
public Optional<Text> getShortDescription(@NotNull CommandSource source) {
|
||||
return Optional.empty();
|
||||
String description = getDescription();
|
||||
return description != null ? Optional.of(Text.of(description)) : Optional.empty();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -87,7 +88,8 @@ public class SpongeRootCommand implements CommandCallable, RootCommand {
|
||||
|
||||
@Override
|
||||
public Text getUsage(@NotNull CommandSource source) {
|
||||
return Text.of();
|
||||
String usage = getUsage();
|
||||
return usage != null ? Text.of(usage) : Text.of();
|
||||
}
|
||||
|
||||
private CommandResult executeSponge(CommandIssuer sender, String commandLabel, String[] args) {
|
||||
|
||||
Reference in New Issue
Block a user