mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Fix other minor suggestion bugs
This commit is contained in:
parent
76b608f90b
commit
50cea37439
@ -51,7 +51,7 @@ public final class SuggestionHelper {
|
|||||||
if (tag.isEmpty() || tag.equals("#")) {
|
if (tag.isEmpty() || tag.equals("#")) {
|
||||||
return Stream.of("##", "##*");
|
return Stream.of("##", "##*");
|
||||||
}
|
}
|
||||||
if (tag.startsWith("#")) {
|
if (tag.startsWith("##")) {
|
||||||
if (tag.equals("##")) {
|
if (tag.equals("##")) {
|
||||||
return Stream.concat(Stream.of("##*"), getNamespacedRegistrySuggestions(BlockCategory.REGISTRY, tag.substring(2)).map(s -> "##" + s));
|
return Stream.concat(Stream.of("##*"), getNamespacedRegistrySuggestions(BlockCategory.REGISTRY, tag.substring(2)).map(s -> "##" + s));
|
||||||
} else if (tag.equals("##*") && allowRandom) {
|
} else if (tag.equals("##*") && allowRandom) {
|
||||||
|
@ -111,7 +111,8 @@ public final class CommandWrapper {
|
|||||||
// Ensure there is a space!
|
// Ensure there is a space!
|
||||||
if (suggestion.getStart() == suggestion.getEnd()
|
if (suggestion.getStart() == suggestion.getEnd()
|
||||||
&& suggestion.getEnd() == builder.getInput().length()
|
&& suggestion.getEnd() == builder.getInput().length()
|
||||||
&& !builder.getInput().endsWith(" ")) {
|
&& !builder.getInput().endsWith(" ")
|
||||||
|
&& !builder.getInput().endsWith("\"")) {
|
||||||
suggestionText = " " + suggestionText;
|
suggestionText = " " + suggestionText;
|
||||||
}
|
}
|
||||||
result.add(new Suggestion(
|
result.add(new Suggestion(
|
||||||
|
@ -103,7 +103,8 @@ public final class CommandWrapper {
|
|||||||
// Ensure there is a space!
|
// Ensure there is a space!
|
||||||
if (suggestion.getStart() == suggestion.getEnd()
|
if (suggestion.getStart() == suggestion.getEnd()
|
||||||
&& suggestion.getEnd() == builder.getInput().length()
|
&& suggestion.getEnd() == builder.getInput().length()
|
||||||
&& !builder.getInput().endsWith(" ")) {
|
&& !builder.getInput().endsWith(" ")
|
||||||
|
&& !builder.getInput().endsWith("\"")) {
|
||||||
suggestionText = " " + suggestionText;
|
suggestionText = " " + suggestionText;
|
||||||
}
|
}
|
||||||
result.add(new Suggestion(
|
result.add(new Suggestion(
|
||||||
|
Loading…
Reference in New Issue
Block a user