diff --git a/Plan/common/src/main/java/com/djrapitops/plan/commands/PlanCommand.java b/Plan/common/src/main/java/com/djrapitops/plan/commands/PlanCommand.java index c96e8e582..1e2609b9c 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/commands/PlanCommand.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/commands/PlanCommand.java @@ -136,6 +136,7 @@ public class PlanCommand { command.getAliases().add("planbungee"); command.getAliases().add("planvelocity"); command.getAliases().add("planproxy"); + command.getAliases().add("planp"); } return command; } @@ -367,10 +368,10 @@ public class PlanCommand { } Optional firstArgument = arguments.get(0); if (!firstArgument.isPresent()) { - return tabCompleteCache.getMatchingPlayerIdentifiers(null); + return tabCompleteCache.getMatchingBackupFilenames(null); } String part = firstArgument.get(); - return tabCompleteCache.getMatchingPlayerIdentifiers(part); + return tabCompleteCache.getMatchingBackupFilenames(part); } private Subcommand moveCommand() { diff --git a/Plan/common/src/main/java/com/djrapitops/plan/commands/use/HelpFormatter.java b/Plan/common/src/main/java/com/djrapitops/plan/commands/use/HelpFormatter.java index 6747fa259..c85e2e77b 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/commands/use/HelpFormatter.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/commands/use/HelpFormatter.java @@ -46,7 +46,7 @@ public class HelpFormatter { String asString = subcommands.stream() .map(cmd -> m + mainCommand + " " + cmd.getPrimaryAlias() + - (sender.supportsChatEvents() ? "" : " " + cmd.getArgumentsAsString()) + "***" + + (sender.supportsChatEvents() ? " " : " " + cmd.getArgumentsAsString()) + "***" + s + cmd.getDescription() + "\n" ).collect(StringBuilder::new, StringBuilder::append, StringBuilder::append) .toString(); diff --git a/Plan/nukkit/src/main/java/com/djrapitops/plan/commands/use/NukkitMessageBuilder.java b/Plan/nukkit/src/main/java/com/djrapitops/plan/commands/use/NukkitMessageBuilder.java index 2fc611988..a1e1fdf26 100644 --- a/Plan/nukkit/src/main/java/com/djrapitops/plan/commands/use/NukkitMessageBuilder.java +++ b/Plan/nukkit/src/main/java/com/djrapitops/plan/commands/use/NukkitMessageBuilder.java @@ -42,8 +42,7 @@ public class NukkitMessageBuilder implements MessageBuilder { @Override public MessageBuilder link(String link) { - addPart(link); - return this; + return addPart(link); } @Override diff --git a/Plan/velocity/src/main/java/com/djrapitops/plan/commands/use/VelocityMessageBuilder.java b/Plan/velocity/src/main/java/com/djrapitops/plan/commands/use/VelocityMessageBuilder.java index b43cefa15..45f18c92d 100644 --- a/Plan/velocity/src/main/java/com/djrapitops/plan/commands/use/VelocityMessageBuilder.java +++ b/Plan/velocity/src/main/java/com/djrapitops/plan/commands/use/VelocityMessageBuilder.java @@ -26,7 +26,7 @@ import java.util.Collection; public class VelocityMessageBuilder implements MessageBuilder { private final VelocityCMDSender sender; - private final TextComponent.Builder builder; + private TextComponent.Builder builder; public VelocityMessageBuilder(VelocityCMDSender sender) { this.sender = sender; @@ -35,31 +35,31 @@ public class VelocityMessageBuilder implements MessageBuilder { @Override public MessageBuilder addPart(String content) { - builder.content(content); + builder = builder.append(content); return this; } @Override public MessageBuilder newLine() { - builder.content("\n"); + builder = builder.append("\n"); return this; } @Override public MessageBuilder link(String url) { - builder.clickEvent(ClickEvent.openUrl(url)); + builder = builder.clickEvent(ClickEvent.openUrl(url)); return this; } @Override public MessageBuilder command(String command) { - builder.clickEvent(ClickEvent.runCommand(command)); + builder = builder.clickEvent(ClickEvent.runCommand(command)); return this; } @Override public MessageBuilder hover(String s) { - builder.hoverEvent(HoverEvent.showText(TextComponent.of(s))); + builder = builder.hoverEvent(HoverEvent.showText(TextComponent.of(s))); return this; } @@ -67,32 +67,31 @@ public class VelocityMessageBuilder implements MessageBuilder { public MessageBuilder hover(String... strings) { TextComponent.Builder hoverText = TextComponent.builder(); for (String string : strings) { - hoverText.content(string); + hoverText.append(string); } - builder.hoverEvent(HoverEvent.showText(hoverText.build())); + builder = builder.hoverEvent(HoverEvent.showText(hoverText.build())); return this; } @Override public MessageBuilder hover(Collection lines) { TextComponent.Builder hoverText = TextComponent.builder(); - hoverText.content(new TextStringBuilder().appendWithSeparators(lines, "\n").build()); - builder.hoverEvent(HoverEvent.showText(hoverText.build())); + hoverText.append(new TextStringBuilder().appendWithSeparators(lines, "\n").build()); + builder = builder.hoverEvent(HoverEvent.showText(hoverText.build())); return this; } @Override public MessageBuilder indent(int amount) { for (int i = 0; i < amount; i++) { - builder.content(" "); + builder = builder.append(" "); } return this; } @Override public MessageBuilder tabular(CharSequence charSequence) { - addPart(sender.getFormatter().table(charSequence.toString(), ":")); - return this; + return addPart(sender.getFormatter().table(charSequence.toString(), ":")); } @Override