mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Don't suggest ##* for masks.
This commit is contained in:
parent
50cea37439
commit
c93e5ccfdf
@ -49,11 +49,12 @@ public final class SuggestionHelper {
|
||||
|
||||
public static Stream<String> getBlockCategorySuggestions(String tag, boolean allowRandom) {
|
||||
if (tag.isEmpty() || tag.equals("#")) {
|
||||
return Stream.of("##", "##*");
|
||||
return allowRandom ? Stream.of("##", "##*") : Stream.of("##");
|
||||
}
|
||||
if (tag.startsWith("##")) {
|
||||
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) {
|
||||
return getNamespacedRegistrySuggestions(BlockCategory.REGISTRY, tag.substring(3)).map(s -> "##*" + s);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user