Fix other minor suggestion bugs

Dieser Commit ist enthalten in:
Kenzie Togami 2019-07-27 23:49:11 -07:00
Ursprung 76b608f90b
Commit 50cea37439
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 5D200B325E157A81
3 geänderte Dateien mit 5 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -51,7 +51,7 @@ public final class SuggestionHelper {
if (tag.isEmpty() || tag.equals("#")) {
return Stream.of("##", "##*");
}
if (tag.startsWith("#")) {
if (tag.startsWith("##")) {
if (tag.equals("##")) {
return Stream.concat(Stream.of("##*"), getNamespacedRegistrySuggestions(BlockCategory.REGISTRY, tag.substring(2)).map(s -> "##" + s));
} else if (tag.equals("##*") && allowRandom) {

Datei anzeigen

@ -111,7 +111,8 @@ public final class CommandWrapper {
// Ensure there is a space!
if (suggestion.getStart() == suggestion.getEnd()
&& suggestion.getEnd() == builder.getInput().length()
&& !builder.getInput().endsWith(" ")) {
&& !builder.getInput().endsWith(" ")
&& !builder.getInput().endsWith("\"")) {
suggestionText = " " + suggestionText;
}
result.add(new Suggestion(

Datei anzeigen

@ -103,7 +103,8 @@ public final class CommandWrapper {
// Ensure there is a space!
if (suggestion.getStart() == suggestion.getEnd()
&& suggestion.getEnd() == builder.getInput().length()
&& !builder.getInput().endsWith(" ")) {
&& !builder.getInput().endsWith(" ")
&& !builder.getInput().endsWith("\"")) {
suggestionText = " " + suggestionText;
}
result.add(new Suggestion(