Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-08 04:20:06 +01:00
Don't suggest ##* for masks.
Dieser Commit ist enthalten in:
Ursprung
50cea37439
Commit
c93e5ccfdf
@ -49,11 +49,12 @@ public final class SuggestionHelper {
|
|||||||
|
|
||||||
public static Stream<String> getBlockCategorySuggestions(String tag, boolean allowRandom) {
|
public static Stream<String> getBlockCategorySuggestions(String tag, boolean allowRandom) {
|
||||||
if (tag.isEmpty() || tag.equals("#")) {
|
if (tag.isEmpty() || tag.equals("#")) {
|
||||||
return Stream.of("##", "##*");
|
return allowRandom ? Stream.of("##", "##*") : 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(allowRandom ? Stream.of("##*") : Stream.empty(),
|
||||||
|
getNamespacedRegistrySuggestions(BlockCategory.REGISTRY, tag.substring(2)).map(s -> "##" + s));
|
||||||
} else if (tag.equals("##*") && allowRandom) {
|
} else if (tag.equals("##*") && allowRandom) {
|
||||||
return getNamespacedRegistrySuggestions(BlockCategory.REGISTRY, tag.substring(3)).map(s -> "##*" + s);
|
return getNamespacedRegistrySuggestions(BlockCategory.REGISTRY, tag.substring(3)).map(s -> "##*" + s);
|
||||||
} else {
|
} else {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren