mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 10:38:34 +00:00
various minor
CFI works without PlotSquared tab completion biome tweaks WIP on anvil document disallowed-blocks in legacy config
This commit is contained in:
@ -21,6 +21,7 @@ package com.sk89q.worldedit.world.block;
|
||||
|
||||
import com.boydti.fawe.command.SuggestInputParseException;
|
||||
import com.boydti.fawe.object.string.MutableCharSequence;
|
||||
import com.boydti.fawe.util.StringMan;
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
@ -38,6 +39,7 @@ import com.sk89q.worldedit.world.registry.BlockMaterial;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@ -121,8 +123,9 @@ public class BlockState implements BlockStateHolder<BlockState>, FawePattern {
|
||||
if (type == null) {
|
||||
String input = key.toString();
|
||||
throw new SuggestInputParseException("Does not match a valid block type: " + input, input, () -> Stream.of(BlockTypes.values)
|
||||
.filter(b -> b.getId().contains(input))
|
||||
.filter(b -> StringMan.blockStateMatches(input, b.getId()))
|
||||
.map(e1 -> e1.getId())
|
||||
.sorted(StringMan.blockStateComparator(input))
|
||||
.collect(Collectors.toList())
|
||||
);
|
||||
}
|
||||
@ -183,7 +186,8 @@ public class BlockState implements BlockStateHolder<BlockState>, FawePattern {
|
||||
throw new SuggestInputParseException("Invalid property " + charSequence + ":" + input + " for type " + type, input, () ->
|
||||
finalType.getProperties().stream()
|
||||
.map(p -> p.getName())
|
||||
.filter(p -> p.startsWith(input))
|
||||
.filter(p -> StringMan.blockStateMatches(input, p))
|
||||
.sorted(StringMan.blockStateComparator(input))
|
||||
.collect(Collectors.toList()));
|
||||
} else {
|
||||
throw new SuggestInputParseException("No operator for " + state, "", () -> Arrays.asList("="));
|
||||
|
@ -912,8 +912,9 @@ public final class BlockTypes {
|
||||
}
|
||||
|
||||
throw new SuggestInputParseException("Does not match a valid block type: " + inputLower, inputLower, () -> Stream.of(BlockTypes.values)
|
||||
.filter(b -> b.getId().contains(inputLower))
|
||||
.filter(b -> StringMan.blockStateMatches(inputLower, b.getId()))
|
||||
.map(e1 -> e1.getId())
|
||||
.sorted(StringMan.blockStateComparator(inputLower))
|
||||
.collect(Collectors.toList())
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user