Minor bug fixes

This commit is contained in:
Kenzie Togami
2019-04-28 17:27:33 -07:00
parent 32d4b36419
commit 6255ccce38
6 changed files with 27 additions and 17 deletions

View File

@ -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);
}
}