Fix Bukkit Description being null, supply usage/description to Sponge/Bungee

This commit is contained in:
Aikar
2018-03-17 19:51:52 -04:00
parent 901359356f
commit ec235d80fc
3 changed files with 28 additions and 33 deletions
@@ -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) {