mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-02 11:26:42 +00:00
Minor bug fixes
This commit is contained in:
@ -84,6 +84,7 @@ public class ApplyBrushCommands {
|
||||
builder.addParts(REGION_FACTORY, RADIUS);
|
||||
builder.addPart(SubCommandPart.builder(TranslatableComponent.of("type"), TextComponent.of("Type of brush to use"))
|
||||
.withCommands(manager.getAllCommands().collect(Collectors.toList()))
|
||||
.required()
|
||||
.build());
|
||||
});
|
||||
}
|
||||
|
@ -89,6 +89,7 @@ public class PaintBrushCommands {
|
||||
builder.addParts(REGION_FACTORY, RADIUS, DENSITY);
|
||||
builder.addPart(SubCommandPart.builder(TranslatableComponent.of("type"), TextComponent.of("Type of brush to use"))
|
||||
.withCommands(manager.getAllCommands().collect(Collectors.toList()))
|
||||
.required()
|
||||
.build());
|
||||
});
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ import com.sk89q.worldedit.world.World;
|
||||
import org.enginehub.piston.CommandManager;
|
||||
import org.enginehub.piston.converter.ArgumentConverter;
|
||||
import org.enginehub.piston.converter.ConversionResult;
|
||||
import org.enginehub.piston.converter.FailedConversion;
|
||||
import org.enginehub.piston.converter.SuccessfulConversion;
|
||||
import org.enginehub.piston.inject.InjectedValueAccess;
|
||||
import org.enginehub.piston.inject.Key;
|
||||
@ -86,7 +87,7 @@ public class FactoryConverter<T> implements ArgumentConverter<T> {
|
||||
factoryExtractor.apply(worldEdit).parseFromInput(argument, parserContext)
|
||||
);
|
||||
} catch (InputParseException e) {
|
||||
throw new IllegalArgumentException(e);
|
||||
return FailedConversion.from(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user